@sap-cloud-sdk/odata-common
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
54 lines • 2.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderableFilterFunction = void 0;
const filter_1 = require("./filter");
const filter_function_base_1 = require("./filter-function-base");
/**
* Representation of a filter function, that returns a value of an orderable type. This supports int, double and decimal values.
* @internal
*/
class OrderableFilterFunction extends filter_function_base_1.FilterFunction {
/**
* 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, parameters, edmType) {
super(functionName, parameters, edmType);
}
/**
* 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) {
return new filter_1.Filter(this, 'gt', value, this.edmType);
}
/**
* 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) {
return new filter_1.Filter(this, 'ge', value, this.edmType);
}
/**
* 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) {
return new filter_1.Filter(this, 'lt', value, this.edmType);
}
/**
* 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) {
return new filter_1.Filter(this, 'le', value, this.edmType);
}
}
exports.OrderableFilterFunction = OrderableFilterFunction;
//# sourceMappingURL=orderable-filter-function.js.map