UNPKG

@mikro-orm/core

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

25 lines (24 loc) 1.46 kB
import type { EntityData, EntityMetadata } from '../typings.js'; import { Hydrator } from './Hydrator.js'; import type { EntityFactory } from '../entity/EntityFactory.js'; type EntityHydrator<T extends object> = (entity: T, data: EntityData<T>, factory: EntityFactory, newEntity: boolean, convertCustomTypes: boolean, schema?: string, parentSchema?: string, normalizeAccessors?: boolean) => void; /** @internal JIT-compiled hydrator that converts raw database rows into entity instances with optimized generated code. */ export declare class ObjectHydrator extends Hydrator { #private; /** * @inheritDoc */ hydrate<T extends object>(entity: T, meta: EntityMetadata<T>, data: EntityData<T>, factory: EntityFactory, type: 'full' | 'reference', newEntity?: boolean, convertCustomTypes?: boolean, schema?: string, parentSchema?: string, normalizeAccessors?: boolean): void; /** * @inheritDoc */ hydrateReference<T extends object>(entity: T, meta: EntityMetadata<T>, data: EntityData<T>, factory: EntityFactory, convertCustomTypes?: boolean, schema?: string, parentSchema?: string, normalizeAccessors?: boolean): void; /** * @internal Highly performance-sensitive method. */ getEntityHydrator<T extends object>(meta: EntityMetadata<T>, type: 'full' | 'reference', normalizeAccessors?: boolean): EntityHydrator<T>; private createCollectionItemMapper; private wrap; private safeKey; } export {};