UNPKG

hydrate-mongodb

Version:
32 lines (31 loc) 1.76 kB
import { MappingBase } from "./mappingBase"; import { MappingModel } from "./mappingModel"; import { Property } from "./property"; import { Reference } from "../reference"; import { InternalSession } from "../session"; import { ResultCallback } from "../core/callback"; import { ResolveContext } from "./resolveContext"; import { ReadContext } from "./readContext"; import { Observer } from "../observer"; import { WriteContext } from "./writeContext"; export declare class ObjectMapping extends MappingBase { properties: Property[]; private _propertiesByName; private _propertiesByField; constructor(); addProperty(property: Property): Property; validateProperty(property: Property): string; getProperty(name: string): Property; getPropertyForField(field: string): Property; getProperties(flags?: MappingModel.PropertyFlags): Property[]; read(context: ReadContext, value: any): any; protected readObject(context: ReadContext, obj: any, value: any, checkRemoved: boolean): any; write(context: WriteContext, value: any): any; protected writeObject(context: WriteContext, document: any, value: any): any; watch(value: any, observer: Observer, visited: any[]): void; areEqual(documentValue1: any, documentValue2: any): boolean; walk(session: InternalSession, value: any, flags: MappingModel.PropertyFlags, entities: any[], embedded: any[], references: Reference[]): void; fetch(session: InternalSession, parentEntity: any, value: any, path: string[], depth: number, callback: ResultCallback<any>): void; protected fetchPropertyValue(session: InternalSession, value: any, property: Property, callback: ResultCallback<any>): void; protected resolveCore(context: ResolveContext): void; }