UNPKG

@sap-cloud-sdk/odata-common

Version:

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

39 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FilterFunction = void 0; const filter_1 = require("./filter"); /** * Data structure to represent OData filter functions. * Use the factory function {@link filterFunction} to create instances of `FilterFunction`. */ class FilterFunction { /** * Creates an instance of FilterFunction. * @param functionName - Name of the function. * @param parameters - Representation of the parameters passed to the filter function. * @param edmType - EDM type of the return type of the filter function. */ constructor(functionName, parameters, edmType) { this.functionName = functionName; this.parameters = parameters; this.edmType = edmType; } /** * Creates an instance of Filter for this filter function and the given value using the operator 'eq', i.e. `==`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ equals(value) { return new filter_1.Filter(this, 'eq', value, this.edmType); } /** * Creates an instance of Filter for this filter function and the given value using the operator 'ne', i.e. `!=`. * @param value - Value to be used in the filter. * @returns The resulting filter. */ notEquals(value) { return new filter_1.Filter(this, 'ne', value, this.edmType); } } exports.FilterFunction = FilterFunction; //# sourceMappingURL=filter-function-base.js.map