ts-odata-client
Version:
OData TypeScript Client
45 lines (44 loc) • 1.82 kB
TypeScript
import type { ODataResponse } from "./ODataResponse";
import { ODataQuery } from "./ODataQuery";
import type { Expression } from "./Expression";
import { createProxiedEntity } from "./ProxyFilterTypes";
import type { EntityProxy } from "./ProxyTypes";
import type { ODataV4QuerySegments } from "./ODataV4ExpressionVisitor";
/**
* Base type used by all @type {ODataQueryProvider} implementations.
*/
export declare abstract class ODataQueryProvider {
/**
* Creates a new @type {ODataQuery} using the current provider.
* @param expression The @type {Expression} the query will be based on.
*/
createQuery<T, U>(expression?: Expression): ODataQuery<T, U>;
/**
* Executes the provided @type {Expression} and returns the results as a JSON object.
* @param expression
*/
abstract executeQueryAsync<T extends ODataResponse>(expression?: Expression): Promise<T>;
/**
* Fetches the OData response from the provided URL. Primarily used to fetch subsequent pages
* @param url
*/
abstract executeQueryAsync<T extends ODataResponse>(odataUrl: string): Promise<T>;
/**
* Executed the provided @type {Expression} and returns the raw response.
* @param expression
*/
abstract executeRequestAsync(expression?: Expression): Promise<Response>;
/**
* Returns the value that represents the query that will be executed.
* @param expression
*/
abstract buildQuery(expression?: Expression): unknown;
/**
* Returns the value that represents the expression that will be executed.
* @param expression
*/
abstract build(expression?: Expression): ODataV4QuerySegments;
private lambdaProxyCounter;
[createProxiedEntity]<T>(isLambdaProxy?: boolean): EntityProxy<T>;
private createPropertyProxy;
}