@sap-cloud-sdk/odata-v4
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
22 lines • 1.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.any = any;
exports.all = all;
const internal_1 = require("@sap-cloud-sdk/odata-common/internal");
/**
* Will return the entity if at least one element of the one-to-many link relation fulfills the condition.
* @param filters - A filter condition like MyEntity.someMultiLink.someProperty.eq('value').
* @returns The lambda filter function to be considered in the query.
*/
function any(...filters) {
return new internal_1.FilterLambdaExpression((0, internal_1.and)((0, internal_1.toFilterableList)(filters)), 'any');
}
/**
* Will return the entity if all elements of the one-to-many link relation fulfill the condition.
* @param filters - A filter condition like MyEntity.someMultiLink.someProperty.eq('value').
* @returns The lambda filter function to be considered in the query.
*/
function all(...filters) {
return new internal_1.FilterLambdaExpression((0, internal_1.and)((0, internal_1.toFilterableList)(filters)), 'all');
}
//# sourceMappingURL=filter-lambda-expression.js.map