UNPKG

adonis-odm

Version:

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

37 lines 1.08 kB
import type { BaseModel } from './base_model.js'; /** * AttributeManager - Handles attribute getting, setting, and management * * This class encapsulates all the logic for managing model attributes, * including getting, setting, filling, and merging attributes. */ export declare class AttributeManager { private model; constructor(model: BaseModel); /** * Fill model with attributes */ fill(attributes: Record<string, any>): BaseModel; /** * Merge new attributes into the model */ merge(attributes: Record<string, any>): BaseModel; /** * Get an attribute value */ getAttribute(key: string): any; /** * Set an attribute value */ setAttribute(key: string, value: any): void; /** * Get dirty attributes * Returns attributes with database column names (snake_case) for database operations */ getDirtyAttributes(): Record<string, any>; /** * Sync original values with current values */ syncOriginal(): void; } //# sourceMappingURL=attribute_manager.d.ts.map