@aradox/multi-orm
Version:
Type-safe ORM with multi-datasource support, row-level security, and Prisma-like API for PostgreSQL, SQL Server, and HTTP APIs
42 lines • 1.26 kB
TypeScript
import { IR, QueryResult, FindManyArgs } from '../types/ir';
import { Adapter } from '../types/adapter';
import { CacheOptions } from './cache';
export declare class Stitcher {
private ir;
private adapters;
private includeDepth;
private computedExecutor;
private queryCache;
constructor(ir: IR, adapters: Map<string, Adapter>, schemaPath?: string, cacheOptions?: CacheOptions);
findMany<T>(modelName: string, args: FindManyArgs<T>): Promise<QueryResult<T[]>>;
findUnique<T>(modelName: string, args: any): Promise<QueryResult<T | null>>;
private processIncludes;
private fetchAndAttachRelation;
private fetchChildren;
private canPushDownFilter;
private postFilter;
private matchesWhere;
private matchesFieldFilter;
private validateLimits;
private mergeOptions;
private getAdapter;
/**
* Invalidate cache for a specific model
*/
invalidateCache(modelName: string): void;
/**
* Clear all cache
*/
clearCache(): void;
/**
* Get cache statistics
*/
getCacheStats(): {
size: number;
maxSize: number;
hitRate: number;
totalHits: number;
totalMisses: number;
};
}
//# sourceMappingURL=stitcher.d.ts.map