@sap-cloud-sdk/odata-common
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
25 lines • 767 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnaryFilter = void 0;
exports.isUnaryFilter = isUnaryFilter;
/**
* Class representing a unary filter which is a filter containing just a single argument e.g. not.
*/
class UnaryFilter {
constructor(singleOperand, operator) {
this.singleOperand = singleOperand;
this.operator = operator;
}
}
exports.UnaryFilter = UnaryFilter;
/**
* Type guard for the UnaryFilter object.
* @param filterable - Variable to be checked
* @returns boolean
* @internal
*/
function isUnaryFilter(filterable) {
return (typeof filterable['singleOperand'] !== 'undefined' &&
typeof filterable['operator'] !== 'undefined');
}
//# sourceMappingURL=unary-filter.js.map