UNPKG

adonis-odm

Version:

A comprehensive MongoDB ODM for AdonisJS with Lucid-style API, type-safe relationships, embedded documents, and transaction support

36 lines 904 B
import type { BaseModel } from './base_model.js'; /** * PersistenceManager - Handles database persistence operations * * This class encapsulates all the logic for saving, deleting, inserting, * and updating models in the database. */ export declare class PersistenceManager { model: BaseModel; constructor(model: BaseModel); /** * Save the model to the database */ save(): Promise<BaseModel>; /** * Delete the model from the database */ delete(): Promise<boolean>; /** * Apply automatic timestamps */ private applyTimestamps; /** * Perform database insert */ performInsert(): Promise<void>; /** * Perform database update */ performUpdate(): Promise<void>; /** * Sync the original values with current values */ private syncOriginal; } //# sourceMappingURL=persistence_manager.d.ts.map