UNPKG

3.27 kBTypeScriptView Raw
1import { Field, StringFilterFunction, BooleanFilterFunction } from '../odata-common';
2import { Entity } from './entity';
3/**
4 * Build a filter function to test whether a string is a substring of the other. Evaluates to boolean.
5 * @param substr - The substring to test for. This can either be a string, a reference to a field or another filter function.
6 * @param str - The string to test. This can either be a string, a reference to a field or another filter function.
7 *
8 * @returns The newly created filter function
9 */
10export declare function substringOf<EntityT extends Entity>(substr: string | Field<EntityT, boolean, boolean> | StringFilterFunction<EntityT>, str: string | Field<EntityT, boolean, boolean> | StringFilterFunction<EntityT>): BooleanFilterFunction<EntityT>;
11/**
12 * Build a filter function to replace the occurrence of a search string with another string. Evaluates to string.
13 * @param str - The string to get the index from. This can either be a string, a reference to a field or another filter function.
14 * @param searchStr - The substring to get the index for. This can either be a string, a reference to a field or another filter function.
15 * @param replaceStr - The substring to get the index for. This can either be a string, a reference to a field or another filter function.
16 *
17 * @returns The newly created filter function
18 */
19export declare function replace<EntityT extends Entity>(str: string | Field<EntityT, boolean, boolean> | StringFilterFunction<EntityT>, searchStr: string | Field<EntityT, boolean, boolean> | StringFilterFunction<EntityT>, replaceStr: string | Field<EntityT, boolean, boolean> | StringFilterFunction<EntityT>): StringFilterFunction<EntityT>;
20/**
21 * @hidden
22 * Export length filter function for backwards compatibility.
23 */
24export declare const length: typeof import("../odata-common").length;
25/**
26 * @hidden
27 * Export substring filter function for backwards compatibility.
28 */
29export declare const substring: typeof import("../odata-common").substring;
30/**
31 * OData v2 specific filter functions
32 */
33export declare const filterFunctions: {
34 substringOf: typeof substringOf;
35 replace: typeof replace;
36 endsWith: typeof import("../odata-common").endsWith;
37 startsWith: typeof import("../odata-common").startsWith;
38 length: typeof import("../odata-common").length;
39 indexOf: typeof import("../odata-common").indexOf;
40 substring: typeof import("../odata-common").substring;
41 toLower: typeof import("../odata-common").toLower;
42 toUpper: typeof import("../odata-common").toUpper;
43 trim: typeof import("../odata-common").trim;
44 concat: typeof import("../odata-common").concat;
45 round: typeof import("../odata-common").round;
46 floor: typeof import("../odata-common").floor;
47 ceiling: typeof import("../odata-common").ceiling;
48 day: typeof import("../odata-common").day;
49 hour: typeof import("../odata-common").hour;
50 minute: typeof import("../odata-common").minute;
51 month: typeof import("../odata-common").month;
52 second: typeof import("../odata-common").second;
53 year: typeof import("../odata-common").year;
54 isOf: typeof import("../odata-common").isOf;
55};
56export { filterFunctions as filterFunctionsV2 };
57//# sourceMappingURL=filter-functions.d.ts.map
\No newline at end of file