UNPKG

2.46 kBTypeScriptView Raw
1import { Entity, ODataVersionOf } from '../entity';
2import { FieldType } from '../selectable';
3import { EdmTypeShared } from '../edm-types';
4import { Filter } from './filter';
5import { FilterFunction, FilterFunctionParameterType } from './filter-function-base';
6/**
7 * Representation of a filter function, that returns a value of an orderable type. This supports int, double and decimal values.
8 */
9export declare abstract class OrderableFilterFunction<EntityT extends Entity, ReturnT extends FieldType> extends FilterFunction<EntityT, ReturnT> {
10 /**
11 * Creates an instance of OrderableFilterFunction.
12 * @param functionName - Name of the function that returns a numeric value
13 * @param parameters - Representation of the parameters passed to the filter function
14 * @param edmType - Type of the returned numeric value. This influences the formatting of the returned value.
15 */
16 constructor(functionName: string, parameters: FilterFunctionParameterType<EntityT>[], edmType: EdmTypeShared<ODataVersionOf<EntityT>>);
17 /**
18 * Creates an instance of Filter for this filter function and the given value using the operator 'gt', i.e. `>`.
19 * @param value - Value to be used in the filter
20 * @param edmType - EDM type of the field to filter on
21 * @returns The resulting filter
22 */
23 greaterThan(value: ReturnT): Filter<EntityT, ReturnT>;
24 /**
25 * Creates an instance of Filter for this filter function and the given value using the operator 'ge', i.e. `>=`.
26 * @param value - Value to be used in the filter
27 * @param edmType - EDM type of the field to filter on
28 * @returns The resulting filter
29 */
30 greaterOrEqual(value: ReturnT): Filter<EntityT, ReturnT>;
31 /**
32 * Creates an instance of Filter for this filter function and the given value using the operator 'lt', i.e. `<`.
33 * @param value - Value to be used in the filter
34 * @param edmType - EDM type of the field to filter on
35 * @returns The resulting filter
36 */
37 lessThan(value: ReturnT): Filter<EntityT, ReturnT>;
38 /**
39 * Creates an instance of Filter for this filter function and the given value using the operator 'le', i.e. `<=`.
40 * @param value - Value to be used in the filter
41 * @param edmType - EDM type of the field to filter on
42 * @returns The resulting filter
43 */
44 lessOrEqual(value: ReturnT): Filter<EntityT, ReturnT>;
45}
46//# sourceMappingURL=orderable-filter-function.d.ts.map
\No newline at end of file