@odata2ts/odata-query-objects
Version:
Q-Objects are the magic sauce for the odata-query-builder and allow for renaming and type conversion
27 lines (26 loc) • 1.45 kB
TypeScript
import { ValueConverter } from "@odata2ts/converter-api";
import { PrimitiveCollection } from "../primitve-collection/PrimitiveCollectionModel";
import { QFilterExpression } from "../QFilterExpression";
import { QOrderByExpression } from "../QOrderByExpression";
import { LambdaOperatorType } from "./base/LambdaOperatorType";
import { QEntityPathModel } from "./QPathModel";
export declare class QCollectionPath<CollectionType extends PrimitiveCollection> implements QEntityPathModel<CollectionType> {
protected path: string;
protected qEntityFn: () => new (prefix?: string, converter?: ValueConverter<any, any>) => CollectionType;
protected __converter?: ValueConverter<any, any> | undefined;
constructor(path: string, qEntityFn: () => new (prefix?: string, converter?: ValueConverter<any, any>) => CollectionType, __converter?: ValueConverter<any, any> | undefined);
getPath(): string;
getEntity(withPrefix?: boolean): CollectionType;
isCollectionType(): boolean;
private lambdaFunction;
any(fn?: LambdaOperatorType<CollectionType>, prefix?: string): QFilterExpression;
all(fn?: LambdaOperatorType<CollectionType>, prefix?: string): QFilterExpression;
/**
* Sort by total count of these collection items in ascending order.
*/
countAsc(): QOrderByExpression;
/**
* Sort by total count of these collection items in ascending order.
*/
countDesc(): QOrderByExpression;
}