@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.25 kB
TypeScript
import type { EntityData, EntityMetadata } from '../typings';
import { Hydrator } from './Hydrator';
import type { EntityFactory } from '../entity/EntityFactory';
type EntityHydrator<T extends object> = (entity: T, data: EntityData<T>, factory: EntityFactory, newEntity: boolean, convertCustomTypes: boolean, schema?: string, parentSchema?: string) => void;
export declare class ObjectHydrator extends Hydrator {
private readonly hydrators;
private tmpIndex;
/**
* @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): void;
/**
* @inheritDoc
*/
hydrateReference<T extends object>(entity: T, meta: EntityMetadata<T>, data: EntityData<T>, factory: EntityFactory, convertCustomTypes?: boolean, schema?: string, parentSchema?: string): void;
/**
* @internal Highly performance-sensitive method.
*/
getEntityHydrator<T extends object>(meta: EntityMetadata<T>, type: 'full' | 'reference'): EntityHydrator<T>;
private createCollectionItemMapper;
private wrap;
private safeKey;
}
export {};