@sqb/builder 4.20.0 → 4.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/cjs/extensions.js +1 -1
  2. package/cjs/query/delete-query.js +2 -0
  3. package/cjs/query/insert-query.js +2 -0
  4. package/cjs/query/query.js +1 -0
  5. package/cjs/query/returning-query.js +1 -0
  6. package/cjs/query/select-query.js +10 -0
  7. package/cjs/query/union-query.js +2 -0
  8. package/cjs/query/update-query.js +3 -0
  9. package/cjs/serialize-context.js +68 -58
  10. package/cjs/sql-objects/base-field.js +4 -4
  11. package/cjs/sql-objects/case-statement.js +4 -0
  12. package/cjs/sql-objects/coalesce-statement.js +2 -0
  13. package/cjs/sql-objects/count-statement.js +1 -0
  14. package/cjs/sql-objects/expression.js +3 -0
  15. package/cjs/sql-objects/field-expression.js +1 -0
  16. package/cjs/sql-objects/join-statement.js +3 -1
  17. package/cjs/sql-objects/lower-statement.js +2 -0
  18. package/cjs/sql-objects/max-statement.js +2 -0
  19. package/cjs/sql-objects/min-statement.js +2 -0
  20. package/cjs/sql-objects/operators/comp-operator.js +4 -0
  21. package/cjs/sql-objects/operators/logical-operator.js +1 -1
  22. package/cjs/sql-objects/operators/op-and.js +1 -4
  23. package/cjs/sql-objects/operators/op-between.js +2 -2
  24. package/cjs/sql-objects/operators/op-eq.js +2 -2
  25. package/cjs/sql-objects/operators/op-exists.js +2 -2
  26. package/cjs/sql-objects/operators/op-gt.js +2 -2
  27. package/cjs/sql-objects/operators/op-gte.js +2 -2
  28. package/cjs/sql-objects/operators/op-ilike.js +2 -5
  29. package/cjs/sql-objects/operators/op-in.js +2 -2
  30. package/cjs/sql-objects/operators/op-is-not.js +2 -2
  31. package/cjs/sql-objects/operators/op-is.js +2 -2
  32. package/cjs/sql-objects/operators/op-like.js +2 -2
  33. package/cjs/sql-objects/operators/op-lt.js +2 -2
  34. package/cjs/sql-objects/operators/op-lte.js +2 -2
  35. package/cjs/sql-objects/operators/op-ne.js +2 -2
  36. package/cjs/sql-objects/operators/op-not-between.js +2 -5
  37. package/cjs/sql-objects/operators/op-not-exists.js +2 -5
  38. package/cjs/sql-objects/operators/op-not-ilike.js +2 -5
  39. package/cjs/sql-objects/operators/op-not-in.js +2 -5
  40. package/cjs/sql-objects/operators/op-not-like.js +2 -5
  41. package/cjs/sql-objects/operators/op-not.js +2 -1
  42. package/cjs/sql-objects/operators/op-or.js +1 -4
  43. package/cjs/sql-objects/order-column.js +1 -0
  44. package/cjs/sql-objects/param-expression.js +3 -0
  45. package/cjs/sql-objects/raw-statement.js +1 -0
  46. package/cjs/sql-objects/returning-column.js +1 -0
  47. package/cjs/sql-objects/sequence-getter-statement.js +3 -0
  48. package/cjs/sql-objects/string-agg-statement.js +4 -0
  49. package/cjs/sql-objects/table-name.js +3 -0
  50. package/cjs/sql-objects/upper-statement.js +2 -0
  51. package/esm/extensions.js +1 -1
  52. package/esm/query/delete-query.js +2 -0
  53. package/esm/query/insert-query.js +2 -0
  54. package/esm/query/query.js +1 -0
  55. package/esm/query/returning-query.js +1 -0
  56. package/esm/query/select-query.js +10 -0
  57. package/esm/query/union-query.js +2 -0
  58. package/esm/query/update-query.js +3 -0
  59. package/esm/serialize-context.js +68 -58
  60. package/esm/sql-objects/base-field.js +4 -4
  61. package/esm/sql-objects/case-statement.js +4 -0
  62. package/esm/sql-objects/coalesce-statement.js +2 -0
  63. package/esm/sql-objects/count-statement.js +1 -0
  64. package/esm/sql-objects/expression.js +3 -0
  65. package/esm/sql-objects/field-expression.js +1 -0
  66. package/esm/sql-objects/join-statement.js +3 -1
  67. package/esm/sql-objects/lower-statement.js +2 -0
  68. package/esm/sql-objects/max-statement.js +2 -0
  69. package/esm/sql-objects/min-statement.js +2 -0
  70. package/esm/sql-objects/operators/comp-operator.js +4 -0
  71. package/esm/sql-objects/operators/logical-operator.js +1 -1
  72. package/esm/sql-objects/operators/op-and.js +1 -4
  73. package/esm/sql-objects/operators/op-between.js +2 -2
  74. package/esm/sql-objects/operators/op-eq.js +2 -2
  75. package/esm/sql-objects/operators/op-exists.js +2 -2
  76. package/esm/sql-objects/operators/op-gt.js +2 -2
  77. package/esm/sql-objects/operators/op-gte.js +2 -2
  78. package/esm/sql-objects/operators/op-ilike.js +2 -5
  79. package/esm/sql-objects/operators/op-in.js +2 -2
  80. package/esm/sql-objects/operators/op-is-not.js +2 -2
  81. package/esm/sql-objects/operators/op-is.js +2 -2
  82. package/esm/sql-objects/operators/op-like.js +2 -2
  83. package/esm/sql-objects/operators/op-lt.js +2 -2
  84. package/esm/sql-objects/operators/op-lte.js +2 -2
  85. package/esm/sql-objects/operators/op-ne.js +2 -2
  86. package/esm/sql-objects/operators/op-not-between.js +2 -5
  87. package/esm/sql-objects/operators/op-not-exists.js +2 -5
  88. package/esm/sql-objects/operators/op-not-ilike.js +2 -5
  89. package/esm/sql-objects/operators/op-not-in.js +2 -5
  90. package/esm/sql-objects/operators/op-not-like.js +2 -5
  91. package/esm/sql-objects/operators/op-not.js +2 -1
  92. package/esm/sql-objects/operators/op-or.js +1 -4
  93. package/esm/sql-objects/order-column.js +1 -0
  94. package/esm/sql-objects/param-expression.js +3 -0
  95. package/esm/sql-objects/raw-statement.js +1 -0
  96. package/esm/sql-objects/returning-column.js +1 -0
  97. package/esm/sql-objects/sequence-getter-statement.js +3 -0
  98. package/esm/sql-objects/string-agg-statement.js +4 -0
  99. package/esm/sql-objects/table-name.js +3 -0
  100. package/esm/sql-objects/upper-statement.js +2 -0
  101. package/package.json +1 -1
@@ -4,6 +4,9 @@ exports.ParamExpression = void 0;
4
4
  const enums_js_1 = require("../enums.js");
5
5
  const serializable_js_1 = require("../serializable.js");
6
6
  class ParamExpression extends serializable_js_1.Serializable {
7
+ _name;
8
+ _dataType;
9
+ _isArray;
7
10
  constructor(arg) {
8
11
  super();
9
12
  if (typeof arg === 'object') {
@@ -4,6 +4,7 @@ exports.RawStatement = void 0;
4
4
  const enums_js_1 = require("../enums.js");
5
5
  const serializable_js_1 = require("../serializable.js");
6
6
  class RawStatement extends serializable_js_1.Serializable {
7
+ _text;
7
8
  constructor(str) {
8
9
  super();
9
10
  this._text = str;
@@ -5,6 +5,7 @@ const enums_js_1 = require("../enums.js");
5
5
  const base_field_js_1 = require("./base-field.js");
6
6
  const RETURNING_COLUMN_PATTERN = /^([a-zA-Z_]\w*) *(?:as)? *(\w+)?$/;
7
7
  class ReturningColumn extends base_field_js_1.BaseField {
8
+ _alias;
8
9
  constructor(field) {
9
10
  super();
10
11
  const m = field.match(RETURNING_COLUMN_PATTERN);
@@ -4,6 +4,9 @@ exports.SequenceGetterStatement = void 0;
4
4
  const enums_js_1 = require("../enums.js");
5
5
  const serializable_js_1 = require("../serializable.js");
6
6
  class SequenceGetterStatement extends serializable_js_1.Serializable {
7
+ _expression;
8
+ _next;
9
+ _alias;
7
10
  constructor(expression, next) {
8
11
  super();
9
12
  this._expression = expression;
@@ -7,6 +7,10 @@ const serializable_js_1 = require("../serializable.js");
7
7
  const field_expression_js_1 = require("./field-expression.js");
8
8
  const order_column_js_1 = require("./order-column.js");
9
9
  class StringAGGStatement extends serializable_js_1.Serializable {
10
+ _field;
11
+ _delimiter;
12
+ _orderBy;
13
+ _alias;
10
14
  constructor(field, delimiter) {
11
15
  super();
12
16
  this._field =
@@ -4,6 +4,9 @@ exports.TableName = void 0;
4
4
  const enums_js_1 = require("../enums.js");
5
5
  const serializable_js_1 = require("../serializable.js");
6
6
  class TableName extends serializable_js_1.Serializable {
7
+ schema;
8
+ table;
9
+ alias;
7
10
  constructor(tableName) {
8
11
  super();
9
12
  const m = tableName.match(/^(?:([a-zA-Z][\w$]*)\.)? *([a-zA-Z][\w$]*) *(?:as)? *(\w+)?$/);
@@ -4,6 +4,8 @@ exports.UpperStatement = void 0;
4
4
  const enums_js_1 = require("../enums.js");
5
5
  const serializable_js_1 = require("../serializable.js");
6
6
  class UpperStatement extends serializable_js_1.Serializable {
7
+ _expression;
8
+ _alias;
7
9
  constructor(expression) {
8
10
  super();
9
11
  this._expression = expression;
package/esm/extensions.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export class SerializerRegistry {
2
+ static serializers = [];
2
3
  static get size() {
3
4
  return this.serializers.length;
4
5
  }
@@ -31,4 +32,3 @@ export class SerializerRegistry {
31
32
  return !!this.serializers.find(x => x === extension);
32
33
  }
33
34
  }
34
- SerializerRegistry.serializers = [];
@@ -4,6 +4,8 @@ import { TableName } from '../sql-objects/table-name.js';
4
4
  import { isRawStatement } from '../typeguards.js';
5
5
  import { Query } from './query.js';
6
6
  export class DeleteQuery extends Query {
7
+ _table;
8
+ _where;
7
9
  constructor(tableName) {
8
10
  super();
9
11
  if (!tableName ||
@@ -4,6 +4,8 @@ import { TableName } from '../sql-objects/table-name.js';
4
4
  import { isRawStatement, isSelectQuery, isSerializable, } from '../typeguards.js';
5
5
  import { ReturningQuery } from './returning-query.js';
6
6
  export class InsertQuery extends ReturningQuery {
7
+ _table;
8
+ _input;
7
9
  constructor(tableName, input) {
8
10
  super();
9
11
  if (!tableName ||
@@ -4,6 +4,7 @@ import merge from 'putil-merge';
4
4
  import { Serializable } from '../serializable.js';
5
5
  import { SerializeContext } from '../serialize-context.js';
6
6
  export class Query extends Serializable {
7
+ _params;
7
8
  constructor() {
8
9
  super();
9
10
  EventEmitter.call(this);
@@ -3,6 +3,7 @@ import { printArray } from '../helpers.js';
3
3
  import { ReturningColumn } from '../sql-objects/returning-column.js';
4
4
  import { Query } from './query.js';
5
5
  export class ReturningQuery extends Query {
6
+ _returningColumns;
6
7
  /**
7
8
  *
8
9
  */
@@ -9,6 +9,16 @@ import { TableName } from '../sql-objects/table-name.js';
9
9
  import { isJoinStatement, isSerializable } from '../typeguards.js';
10
10
  import { Query } from './query.js';
11
11
  export class SelectQuery extends Query {
12
+ _tables;
13
+ _columns;
14
+ _joins;
15
+ _where;
16
+ _groupBy;
17
+ _orderBy;
18
+ _limit;
19
+ _offset;
20
+ _alias;
21
+ _distinct;
12
22
  constructor(...column) {
13
23
  super();
14
24
  if (column.length)
@@ -1,6 +1,8 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Query } from './query.js';
3
3
  export class UnionQuery extends Query {
4
+ _queries;
5
+ _unionType;
4
6
  constructor(queries, unionType) {
5
7
  super();
6
8
  this._queries = queries;
@@ -5,6 +5,9 @@ import { TableName } from '../sql-objects/table-name.js';
5
5
  import { isRawStatement } from '../typeguards.js';
6
6
  import { ReturningQuery } from './returning-query.js';
7
7
  export class UpdateQuery extends ReturningQuery {
8
+ _table;
9
+ _input;
10
+ _where;
8
11
  constructor(tableName, input) {
9
12
  super();
10
13
  if (!tableName ||
@@ -3,65 +3,75 @@ import { SerializerRegistry } from './extensions.js';
3
3
  import { Serializable } from './serializable.js';
4
4
  import { isLogicalOperator, isQuery, isSerializable } from './typeguards.js';
5
5
  export class SerializeContext {
6
+ reservedWords = [
7
+ 'schema',
8
+ 'table',
9
+ 'field',
10
+ 'index',
11
+ 'foreign',
12
+ 'key',
13
+ 'select',
14
+ 'insert',
15
+ 'update',
16
+ 'delete',
17
+ 'with',
18
+ 'merge',
19
+ 'join',
20
+ 'inner',
21
+ 'outer',
22
+ 'left',
23
+ 'right',
24
+ 'full',
25
+ 'from',
26
+ 'where',
27
+ 'order',
28
+ 'by',
29
+ 'group',
30
+ 'having',
31
+ 'acs',
32
+ 'ascending',
33
+ 'dsc',
34
+ 'descending',
35
+ 'distinct',
36
+ 'and',
37
+ 'or',
38
+ 'not',
39
+ 'between',
40
+ 'null',
41
+ 'like',
42
+ 'ilike',
43
+ 'count',
44
+ 'sum',
45
+ 'average',
46
+ 'avg',
47
+ 'cascade',
48
+ 'authorization',
49
+ 'create',
50
+ 'add',
51
+ 'drop',
52
+ 'alter',
53
+ 'index',
54
+ 'private',
55
+ 'sequence',
56
+ 'default',
57
+ 'constraint',
58
+ 'references',
59
+ 'primary',
60
+ 'foreign',
61
+ 'user',
62
+ 'password',
63
+ ];
64
+ dialect;
65
+ prettyPrint;
66
+ params;
67
+ dialectVersion;
68
+ strictParams;
69
+ serializeHooks;
70
+ paramOptions;
71
+ preparedParams;
72
+ returningFields;
73
+ strictParamGenId;
6
74
  constructor(opts) {
7
- this.reservedWords = [
8
- 'schema',
9
- 'table',
10
- 'field',
11
- 'index',
12
- 'foreign',
13
- 'key',
14
- 'select',
15
- 'insert',
16
- 'update',
17
- 'delete',
18
- 'with',
19
- 'merge',
20
- 'join',
21
- 'inner',
22
- 'outer',
23
- 'left',
24
- 'right',
25
- 'full',
26
- 'from',
27
- 'where',
28
- 'order',
29
- 'by',
30
- 'group',
31
- 'having',
32
- 'acs',
33
- 'ascending',
34
- 'dsc',
35
- 'descending',
36
- 'distinct',
37
- 'and',
38
- 'or',
39
- 'not',
40
- 'between',
41
- 'null',
42
- 'like',
43
- 'ilike',
44
- 'count',
45
- 'sum',
46
- 'average',
47
- 'avg',
48
- 'cascade',
49
- 'authorization',
50
- 'create',
51
- 'add',
52
- 'drop',
53
- 'alter',
54
- 'index',
55
- 'private',
56
- 'sequence',
57
- 'default',
58
- 'constraint',
59
- 'references',
60
- 'primary',
61
- 'foreign',
62
- 'user',
63
- 'password',
64
- ];
65
75
  if (opts)
66
76
  Object.assign(this, opts);
67
77
  }
@@ -1,7 +1,7 @@
1
1
  import { Expression } from './expression.js';
2
2
  export class BaseField extends Expression {
3
- constructor() {
4
- super(...arguments);
5
- this._field = '';
6
- }
3
+ _field = '';
4
+ _schema;
5
+ _table;
6
+ _descending;
7
7
  }
@@ -2,6 +2,10 @@ import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  import { OpAnd } from './operators/op-and.js';
4
4
  export class CaseStatement extends Serializable {
5
+ _expressions;
6
+ _elseValue;
7
+ _condition;
8
+ _alias;
5
9
  constructor() {
6
10
  super();
7
11
  this._expressions = [];
@@ -1,6 +1,8 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  export class CoalesceStatement extends Serializable {
4
+ _expressions;
5
+ _alias;
4
6
  constructor(...expressions) {
5
7
  super();
6
8
  this._expressions = expressions;
@@ -1,6 +1,7 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  export class CountStatement extends Serializable {
4
+ _alias;
4
5
  get _type() {
5
6
  return SerializationType.COUNT_STATEMENT;
6
7
  }
@@ -1,3 +1,6 @@
1
1
  import { Serializable } from '../serializable.js';
2
2
  export class Expression extends Serializable {
3
+ _dataType;
4
+ _isArray;
5
+ _isDataSet;
3
6
  }
@@ -2,6 +2,7 @@ import { SerializationType } from '../enums.js';
2
2
  import { BaseField } from './base-field.js';
3
3
  const TABLE_COLUMN_PATTERN = /^((?:[a-zA-Z_][\w$_]*\.){0,2}) *([0-9a-zA-Z_][\w$_]*|\*) *(?:as)? *([a-zA-Z_][\w$_]*)?$/;
4
4
  export class FieldExpression extends BaseField {
5
+ _alias;
5
6
  constructor(arg0, arg1, arg2) {
6
7
  super();
7
8
  let expression;
@@ -4,9 +4,11 @@ import { isRawStatement, isSelectQuery, isTableName } from '../typeguards.js';
4
4
  import { OpAnd } from './operators/op-and.js';
5
5
  import { TableName } from './table-name.js';
6
6
  export class JoinStatement extends Serializable {
7
+ _joinType;
8
+ _table;
9
+ _conditions = new OpAnd();
7
10
  constructor(joinType, table) {
8
11
  super();
9
- this._conditions = new OpAnd();
10
12
  // noinspection SuspiciousTypeOfGuard
11
13
  if (!(isSelectQuery(table) ||
12
14
  isRawStatement(table) ||
@@ -1,6 +1,8 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  export class LowerStatement extends Serializable {
4
+ _expression;
5
+ _alias;
4
6
  constructor(expression) {
5
7
  super();
6
8
  this._expression = expression;
@@ -1,6 +1,8 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  export class MaxStatement extends Serializable {
4
+ _expression;
5
+ _alias;
4
6
  constructor(expression) {
5
7
  super();
6
8
  this._expression = expression;
@@ -1,6 +1,8 @@
1
1
  import { SerializationType } from '../enums.js';
2
2
  import { Serializable } from '../serializable.js';
3
3
  export class MinStatement extends Serializable {
4
+ _expression;
5
+ _alias;
4
6
  constructor(expression) {
5
7
  super();
6
8
  this._expression = expression;
@@ -6,6 +6,10 @@ import { Operator } from '../operator.js';
6
6
  import { ParamExpression } from '../param-expression.js';
7
7
  const EXPRESSION_PATTERN = /^([\w\\.$]+)(\[])?/;
8
8
  export class CompOperator extends Operator {
9
+ _left;
10
+ _right;
11
+ _symbol;
12
+ _isArray;
9
13
  constructor(left, right) {
10
14
  super();
11
15
  if (typeof left === 'string') {
@@ -7,9 +7,9 @@ export const WrapOps = {};
7
7
  // noinspection RegExpUnnecessaryNonCapturingGroup
8
8
  const COMPARE_LEFT_PATTERN = /^([\w\\.$]+(?:\[])?) *(.*)$/;
9
9
  export class LogicalOperator extends Operator {
10
+ _items = [];
10
11
  constructor(...expressions) {
11
12
  super();
12
- this._items = [];
13
13
  this.add(...expressions);
14
14
  }
15
15
  get _type() {
@@ -1,8 +1,5 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { LogicalOperator } from './logical-operator.js';
3
3
  export class OpAnd extends LogicalOperator {
4
- constructor() {
5
- super(...arguments);
6
- this._operatorType = OperatorType.and;
7
- }
4
+ _operatorType = OperatorType.and;
8
5
  }
@@ -1,10 +1,10 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpBetween extends CompOperator {
4
+ _operatorType = OperatorType.between;
5
+ _symbol = 'between';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.between;
7
- this._symbol = 'between';
8
8
  if (right && right[1] == null)
9
9
  right[1] = right[0];
10
10
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpEq extends CompOperator {
4
+ _operatorType = OperatorType.eq;
5
+ _symbol = '=';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.eq;
7
- this._symbol = '=';
8
8
  }
9
9
  }
@@ -2,10 +2,10 @@ import { OperatorType } from '../../enums.js';
2
2
  import { isSelectQuery } from '../../typeguards.js';
3
3
  import { CompOperator } from './comp-operator.js';
4
4
  export class OpExists extends CompOperator {
5
+ _operatorType = OperatorType.exists;
6
+ _symbol = 'exists';
5
7
  constructor(query) {
6
8
  super(query);
7
- this._operatorType = OperatorType.exists;
8
- this._symbol = 'exists';
9
9
  if (!(typeof query === 'object' && isSelectQuery(query))) {
10
10
  throw new TypeError('You must provide a SelectQuery in `exists()`');
11
11
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpGt extends CompOperator {
4
+ _operatorType = OperatorType.gt;
5
+ _symbol = '>';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.gt;
7
- this._symbol = '>';
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpGte extends CompOperator {
4
+ _operatorType = OperatorType.gte;
5
+ _symbol = '>=';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.gte;
7
- this._symbol = '>=';
8
8
  }
9
9
  }
@@ -1,9 +1,6 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { OpLike } from './op-like.js';
3
3
  export class OpILike extends OpLike {
4
- constructor() {
5
- super(...arguments);
6
- this._operatorType = OperatorType.iLike;
7
- this._symbol = 'ilike';
8
- }
4
+ _operatorType = OperatorType.iLike;
5
+ _symbol = 'ilike';
9
6
  }
@@ -2,10 +2,10 @@ import { OperatorType } from '../../enums.js';
2
2
  import { isSerializable } from '../../typeguards.js';
3
3
  import { CompOperator } from './comp-operator.js';
4
4
  export class OpIn extends CompOperator {
5
+ _operatorType = OperatorType.in;
6
+ _symbol = 'in';
5
7
  constructor(left, right) {
6
8
  super(left, Array.isArray(right) || isSerializable(right) ? right : [right]);
7
- this._operatorType = OperatorType.in;
8
- this._symbol = 'in';
9
9
  }
10
10
  _serialize(ctx) {
11
11
  if (Array.isArray(this._right) && !this._right.length)
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpIsNot extends CompOperator {
4
+ _operatorType = OperatorType.isNot;
5
+ _symbol = 'is not';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.isNot;
7
- this._symbol = 'is not';
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpIs extends CompOperator {
4
+ _operatorType = OperatorType.is;
5
+ _symbol = 'is';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.is;
7
- this._symbol = 'is';
8
8
  }
9
9
  }
@@ -1,10 +1,10 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpLike extends CompOperator {
4
+ _operatorType = OperatorType.like;
5
+ _symbol = 'like';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.like;
7
- this._symbol = 'like';
8
8
  }
9
9
  __serialize(ctx, o) {
10
10
  if (!o.right.expression)
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpLt extends CompOperator {
4
+ _operatorType = OperatorType.lt;
5
+ _symbol = '<';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.lt;
7
- this._symbol = '<';
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpLte extends CompOperator {
4
+ _operatorType = OperatorType.lte;
5
+ _symbol = '<=';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.lte;
7
- this._symbol = '<=';
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { CompOperator } from './comp-operator.js';
3
3
  export class OpNe extends CompOperator {
4
+ _operatorType = OperatorType.ne;
5
+ _symbol = '!=';
4
6
  constructor(left, right) {
5
7
  super(left, right);
6
- this._operatorType = OperatorType.ne;
7
- this._symbol = '!=';
8
8
  }
9
9
  }
@@ -1,9 +1,6 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { OpBetween } from './op-between.js';
3
3
  export class OpNotBetween extends OpBetween {
4
- constructor() {
5
- super(...arguments);
6
- this._operatorType = OperatorType.notBetween;
7
- this._symbol = 'not between';
8
- }
4
+ _operatorType = OperatorType.notBetween;
5
+ _symbol = 'not between';
9
6
  }
@@ -1,9 +1,6 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { OpExists } from './op-exists.js';
3
3
  export class OpNotExists extends OpExists {
4
- constructor() {
5
- super(...arguments);
6
- this._operatorType = OperatorType.notExists;
7
- this._symbol = 'not exists';
8
- }
4
+ _operatorType = OperatorType.notExists;
5
+ _symbol = 'not exists';
9
6
  }
@@ -1,9 +1,6 @@
1
1
  import { OperatorType } from '../../enums.js';
2
2
  import { OpILike } from './op-ilike.js';
3
3
  export class OpNotILike extends OpILike {
4
- constructor() {
5
- super(...arguments);
6
- this._operatorType = OperatorType.notILike;
7
- this._symbol = 'not ilike';
8
- }
4
+ _operatorType = OperatorType.notILike;
5
+ _symbol = 'not ilike';
9
6
  }