UNPKG

azurite

Version:

An open source Azure Storage API compatible server

31 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const BinaryOperatorNode_1 = tslib_1.__importDefault(require("./BinaryOperatorNode")); const ValueNode_1 = tslib_1.__importDefault(require("./ValueNode")); /** * Represents a logical greater than or equal operation between two nodes (the `ge` query operator). * * This is used in queries which resemble the following: * * RowKey ge 'bar' * * In this case, the `GreaterThanEqualNode` would be the root node, with the left and right nodes * corresponding to the identifier `RowKey` and the constant `bar`, respectively. */ class GreaterThanEqualNode extends BinaryOperatorNode_1.default { get name() { return `ge`; } evaluate(context) { if (this.left instanceof ValueNode_1.default) { return this.left.compare(context, this.right) >= 0; } if (this.right instanceof ValueNode_1.default) { return this.right.compare(context, this.left) <= 0; } return this.left.evaluate(context) >= this.right.evaluate(context); } } exports.default = GreaterThanEqualNode; //# sourceMappingURL=GreaterThanEqualNode.js.map