operators.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. 'use strict';
  2. /**
  3. * Operator symbols to be used when querying data
  4. *
  5. * @see {@link Model#where}
  6. *
  7. * @property eq
  8. * @property ne
  9. * @property gte
  10. * @property gt
  11. * @property lte
  12. * @property lt
  13. * @property not
  14. * @property is
  15. * @property in
  16. * @property notIn
  17. * @property like
  18. * @property notLike
  19. * @property iLike
  20. * @property notILike
  21. * @property startsWith
  22. * @property endsWith
  23. * @property substring
  24. * @property regexp
  25. * @property notRegexp
  26. * @property iRegexp
  27. * @property notIRegexp
  28. * @property between
  29. * @property notBetween
  30. * @property overlap
  31. * @property contains
  32. * @property contained
  33. * @property adjacent
  34. * @property strictLeft
  35. * @property strictRight
  36. * @property noExtendRight
  37. * @property noExtendLeft
  38. * @property and
  39. * @property or
  40. * @property any
  41. * @property all
  42. * @property values
  43. * @property col
  44. * @property placeholder
  45. * @property join
  46. */
  47. const Op = {
  48. eq: Symbol.for('eq'),
  49. ne: Symbol.for('ne'),
  50. gte: Symbol.for('gte'),
  51. gt: Symbol.for('gt'),
  52. lte: Symbol.for('lte'),
  53. lt: Symbol.for('lt'),
  54. not: Symbol.for('not'),
  55. is: Symbol.for('is'),
  56. in: Symbol.for('in'),
  57. notIn: Symbol.for('notIn'),
  58. like: Symbol.for('like'),
  59. notLike: Symbol.for('notLike'),
  60. iLike: Symbol.for('iLike'),
  61. notILike: Symbol.for('notILike'),
  62. startsWith: Symbol.for('startsWith'),
  63. endsWith: Symbol.for('endsWith'),
  64. substring: Symbol.for('substring'),
  65. regexp: Symbol.for('regexp'),
  66. notRegexp: Symbol.for('notRegexp'),
  67. iRegexp: Symbol.for('iRegexp'),
  68. notIRegexp: Symbol.for('notIRegexp'),
  69. between: Symbol.for('between'),
  70. notBetween: Symbol.for('notBetween'),
  71. overlap: Symbol.for('overlap'),
  72. contains: Symbol.for('contains'),
  73. contained: Symbol.for('contained'),
  74. adjacent: Symbol.for('adjacent'),
  75. strictLeft: Symbol.for('strictLeft'),
  76. strictRight: Symbol.for('strictRight'),
  77. noExtendRight: Symbol.for('noExtendRight'),
  78. noExtendLeft: Symbol.for('noExtendLeft'),
  79. and: Symbol.for('and'),
  80. or: Symbol.for('or'),
  81. any: Symbol.for('any'),
  82. all: Symbol.for('all'),
  83. values: Symbol.for('values'),
  84. col: Symbol.for('col'),
  85. placeholder: Symbol.for('placeholder'),
  86. join: Symbol.for('join'),
  87. match: Symbol.for('match')
  88. };
  89. module.exports = Op;