UNPKG

@sap-cloud-sdk/odata-common

Version:

SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.

43 lines (42 loc) 2.22 kB
import { Filter } from './filter'; import { FilterFunction } from './filter-function-base'; import type { EntityBase, ODataVersionOf } from '../entity-base'; import type { EdmTypeShared } from '../edm-types'; import type { FilterFunctionParameterType } from './filter-function-base'; /** * Representation of a filter function, that returns a value of an orderable type. This supports int, double and decimal values. * @internal */ export declare abstract class OrderableFilterFunction<EntityT extends EntityBase, ReturnT> extends FilterFunction<EntityT, ReturnT> { /** * Creates an instance of OrderableFilterFunction. * @param functionName - Name of the function that returns a numeric value. * @param parameters - Representation of the parameters passed to the filter function. * @param edmType - Type of the returned numeric value. This influences the formatting of the returned value. */ constructor(functionName: string, parameters: FilterFunctionParameterType<EntityT>[], edmType: EdmTypeShared<ODataVersionOf<EntityT>>); /** * Creates an instance of Filter for this filter function and the given value using the operator 'gt', i.e. `>`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ greaterThan(value: ReturnT): Filter<EntityT, any, ReturnT>; /** * Creates an instance of Filter for this filter function and the given value using the operator 'ge', i.e. `>=`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ greaterOrEqual(value: ReturnT): Filter<EntityT, any, ReturnT>; /** * Creates an instance of Filter for this filter function and the given value using the operator 'lt', i.e. `<`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ lessThan(value: ReturnT): Filter<EntityT, any, ReturnT>; /** * Creates an instance of Filter for this filter function and the given value using the operator 'le', i.e. `<=`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ lessOrEqual(value: ReturnT): Filter<EntityT, any, ReturnT>; }