odata-sqlite-expand
Version:
OData v4 $expand functionality for SQLite - JOIN operations with TDD and ISP
22 lines • 921 B
TypeScript
import type { ODataExpandField, TableSchema, ForeignKeyRelationship } from 'odata-sqlite-contracts';
export interface ExpandResult {
joins: string[];
selectFields: string[];
parameters: any[];
orderBy: string[];
limit?: number | undefined;
offset?: number | undefined;
}
export interface IExpandBuilder {
buildExpandClause(expand: ODataExpandField[], baseTable: string, schemas: TableSchema[], relationships: ForeignKeyRelationship[]): ExpandResult;
}
export declare class ExpandBuilder implements IExpandBuilder {
buildExpandClause(expand: ODataExpandField[], baseTable: string, schemas: TableSchema[], relationships: ForeignKeyRelationship[]): ExpandResult;
private processExpandField;
private findRelationship;
private findSchema;
private generateJoinClause;
private generateSelectFields;
private buildFilterClause;
}
//# sourceMappingURL=expand-builder.d.ts.map