UNPKG

ts-db-helper

Version:
55 lines 1.49 kB
/** * @public * @class ClauseOperators * * @description * list of managed operators. This class should be converted to an enum in a furture version * * @author Olivier Margarit * * @since 0.2 */ var ClauseOperators = /** @class */ (function () { function ClauseOperators() { } /** * @public * @static * @method isKeyOf check if string is a valid key of ClauseOperator, this check * is not case sensitive * * @param {string} val the value to check * * @return {boolean} is true if key will return a valid value with {@link ClauseOperator.valueOf} */ ClauseOperators.isKeyOf = function (val) { return ClauseOperators.hasOwnProperty(val.toUpperCase()); }; /** * @public * @static * @method valueOf get value of ClauseOperator by using a valid key val. * * @param {string} val the value key * * @return {boolean} the operator linked to the key */ ClauseOperators.valueOf = function (val) { return ClauseOperators[val.toUpperCase()]; }; /** * @public * @constant {string} OR the or operator "OR" */ ClauseOperators.OR = 'OR'; /** * @public * @default * @constant {string} AND the and operator "AND" */ ClauseOperators.AND = 'AND'; return ClauseOperators; }()); export { ClauseOperators }; ; //# sourceMappingURL=clause-operators.constant.js.map