UNPKG

ts-db-helper

Version:
84 lines 2.32 kB
/** * @public * @class ClauseComparators * * @description * list of managed comparators. This class should be converted to an enum in a furture version * * @author Olivier Margarit * * @since 0.2 */ var ClauseComparators = /** @class */ (function () { function ClauseComparators() { } /** * @public * @static * @method isKeyOf check if string is a valid key of ClauseComparator, 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 ClauseComparator.valueOf} */ ClauseComparators.isKeyOf = function (val) { return ClauseComparators.hasOwnProperty(val.toUpperCase()); }; /** * @public * @static * @method valueOf get value of ClauseComparator by using a valid key val. * * @param {string} val the value key * * @return {boolean} the comparator linked to the key */ ClauseComparators.valueOf = function (val) { return ClauseComparators[val.toUpperCase()]; }; /** * @public * @constant {string} DIFF the not equal comparator "!=" */ ClauseComparators.DIFF = '!='; /** * @public * @constant {string} LT the lower than comparator "<" */ ClauseComparators.LT = '<'; /** * @public * @constant {string} LTE the lower than or equals comparator "<=" */ ClauseComparators.LTE = '<='; /** * @public * @constant {string} GT the greater than comparator ">" */ ClauseComparators.GT = '>'; /** * @public * @constant {string} GTE the greater than equal comparator ">=" */ ClauseComparators.GTE = '>='; /** * @public * @constant {string} LIKE the like comparator "LIKE" */ ClauseComparators.LIKE = 'LIKE'; /** * @public * @constant {string} IN the in comparator "IN" */ ClauseComparators.IN = 'IN'; /** * @public * @default * @constant {string} EQ the equal comparator "=" */ ClauseComparators.EQ = '='; return ClauseComparators; }()); export { ClauseComparators }; //# sourceMappingURL=clause-comparators.constant.js.map