UNPKG

@nodeboot/starter-persistence

Version:

Nodeboot starter package for persistence. Supports data access layer auto-configuration providing features like database initialization, consistency check, entity mapping, repository pattern, transactions, paging, migrations, persistence listeners, persis

25 lines 959 B
import { QueryResultCache } from "typeorm/cache/QueryResultCache"; /** * Decorator to register a custom QueryResultCache implementation for persistence query caching. * * This decorator applies dependency injection decoration and sets the provided class * as the active query cache provider in the persistence context. * * @template T - A class extending TypeORM's QueryResultCache. * @returns {ClassDecorator} The class decorator function. * * @example * ```ts * import {PersistenceCache} from "@nodeboot/starter-persistence"; * import {QueryResultCache} from "typeorm/cache/QueryResultCache"; * * @PersistenceCache() * class CustomQueryCache extends QueryResultCache { * // custom cache implementation * } * ``` * * @author Manuel Santos <https://github.com/manusant> */ export declare function PersistenceCache<T extends new (...args: any[]) => QueryResultCache>(): (target: T) => void; //# sourceMappingURL=PersistenceCache.d.ts.map