@sqb/builder 4.1.5 → 4.5.0
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.
- package/README.md +2 -2
- package/cjs/classes.ns.js +41 -0
- package/{dist → cjs}/enums.js +7 -0
- package/{dist → cjs}/extensions.js +0 -0
- package/{dist → cjs}/helpers.js +0 -0
- package/cjs/index.js +27 -0
- package/{dist → cjs}/op.initializers.js +42 -42
- package/cjs/package.json +3 -0
- package/{dist/query/DeleteQuery.js → cjs/query/delete-query.js} +13 -11
- package/{dist/query/InsertQuery.js → cjs/query/insert-query.js} +17 -16
- package/{dist/query/Query.js → cjs/query/query.js} +5 -4
- package/{dist/query/ReturningQuery.js → cjs/query/returning-query.js} +9 -8
- package/cjs/query/select-query.js +294 -0
- package/{dist/query/UpdateQuery.js → cjs/query/update-query.js} +18 -15
- package/{dist/Serializable.js → cjs/serializable.js} +0 -0
- package/{dist/SerializeContext.js → cjs/serialize-context.js} +37 -26
- package/cjs/sql-objects/base-field.js +11 -0
- package/{dist/sql-objects/CaseStatement.js → cjs/sql-objects/case-statement.js} +10 -6
- package/cjs/sql-objects/coalesce-statement.js +46 -0
- package/{dist/sql-objects/CountStatement.js → cjs/sql-objects/count-statement.js} +5 -4
- package/cjs/sql-objects/expression.js +10 -0
- package/{dist/sql-objects/FieldExpression.js → cjs/sql-objects/field-expression.js} +5 -4
- package/{dist/sql-objects/GroupColumn.js → cjs/sql-objects/group-column.js} +4 -4
- package/{dist/sql-objects/JoinStatement.js → cjs/sql-objects/join-statement.js} +20 -18
- package/cjs/sql-objects/lower-statement.js +41 -0
- package/cjs/sql-objects/max-statement.js +41 -0
- package/cjs/sql-objects/min-statement.js +41 -0
- package/{dist/sql-objects/Operator.js → cjs/sql-objects/operator.js} +2 -2
- package/{dist/sql-objects/operators/CompOperator.js → cjs/sql-objects/operators/comp-operator.js} +19 -16
- package/{dist/sql-objects/operators/LogicalOperator.js → cjs/sql-objects/operators/logical-operator.js} +14 -13
- package/cjs/sql-objects/operators/op-and.js +9 -0
- package/{dist/sql-objects/operators/OpBetween.js → cjs/sql-objects/operators/op-between.js} +5 -5
- package/cjs/sql-objects/operators/op-eq.js +13 -0
- package/{dist/sql-objects/operators/OpExists.js → cjs/sql-objects/operators/op-exists.js} +7 -7
- package/cjs/sql-objects/operators/op-gt.js +13 -0
- package/cjs/sql-objects/operators/op-gte.js +13 -0
- package/cjs/sql-objects/operators/op-ilike.js +10 -0
- package/cjs/sql-objects/operators/op-in.js +19 -0
- package/cjs/sql-objects/operators/op-is-not.js +13 -0
- package/cjs/sql-objects/operators/op-is.js +13 -0
- package/{dist/sql-objects/operators/OpLike.js → cjs/sql-objects/operators/op-like.js} +7 -7
- package/cjs/sql-objects/operators/op-lt.js +13 -0
- package/cjs/sql-objects/operators/op-lte.js +13 -0
- package/cjs/sql-objects/operators/op-ne.js +13 -0
- package/cjs/sql-objects/operators/op-not-between.js +10 -0
- package/cjs/sql-objects/operators/op-not-exists.js +10 -0
- package/cjs/sql-objects/operators/op-not-ilike.js +10 -0
- package/cjs/sql-objects/operators/op-not-in.js +10 -0
- package/cjs/sql-objects/operators/op-not-like.js +10 -0
- package/cjs/sql-objects/operators/op-or.js +9 -0
- package/{dist/sql-objects/OrderColumn.js → cjs/sql-objects/order-column.js} +5 -4
- package/{dist/sql-objects/ParamExpression.js → cjs/sql-objects/param-expression.js} +7 -4
- package/{dist/sql-objects/RawStatement.js → cjs/sql-objects/raw-statement.js} +5 -4
- package/{dist/sql-objects/ReturningColumn.js → cjs/sql-objects/returning-column.js} +5 -4
- package/cjs/sql-objects/sequence-getter-statement.js +51 -0
- package/cjs/sql-objects/string-agg-statement.js +82 -0
- package/{dist/sql-objects/TableName.js → cjs/sql-objects/table-name.js} +7 -4
- package/cjs/sql-objects/upper-statement.js +41 -0
- package/cjs/sqlobject.initializers.js +129 -0
- package/cjs/typeguards.js +78 -0
- package/{dist → cjs}/types.js +0 -0
- package/esm/classes.ns.d.ts +38 -0
- package/esm/classes.ns.js +38 -0
- package/{dist → esm}/enums.d.ts +7 -0
- package/esm/enums.js +95 -0
- package/{dist → esm}/extensions.d.ts +1 -1
- package/esm/extensions.js +11 -0
- package/{dist → esm}/helpers.d.ts +0 -0
- package/esm/helpers.js +27 -0
- package/esm/index.d.ts +20 -0
- package/esm/index.js +20 -0
- package/{dist → esm}/op.initializers.d.ts +22 -22
- package/esm/op.initializers.js +126 -0
- package/{dist/query/DeleteQuery.d.ts → esm/query/delete-query.d.ts} +6 -6
- package/esm/query/delete-query.js +51 -0
- package/{dist/query/InsertQuery.d.ts → esm/query/insert-query.d.ts} +5 -5
- package/esm/query/insert-query.js +73 -0
- package/{dist/query/Query.d.ts → esm/query/query.d.ts} +2 -2
- package/esm/query/query.js +36 -0
- package/{dist/query/ReturningQuery.d.ts → esm/query/returning-query.d.ts} +3 -3
- package/esm/query/returning-query.js +41 -0
- package/{dist/query/SelectQuery.d.ts → esm/query/select-query.d.ts} +13 -13
- package/{dist/query/SelectQuery.js → esm/query/select-query.js} +41 -34
- package/{dist/query/UpdateQuery.d.ts → esm/query/update-query.d.ts} +6 -6
- package/esm/query/update-query.js +79 -0
- package/{dist/Serializable.d.ts → esm/serializable.d.ts} +2 -2
- package/esm/serializable.js +2 -0
- package/{dist/SerializeContext.d.ts → esm/serialize-context.d.ts} +1 -1
- package/esm/serialize-context.js +145 -0
- package/{dist/sql-objects/BaseField.d.ts → esm/sql-objects/base-field.d.ts} +1 -1
- package/esm/sql-objects/base-field.js +7 -0
- package/{dist/sql-objects/CaseStatement.d.ts → esm/sql-objects/case-statement.d.ts} +6 -6
- package/esm/sql-objects/case-statement.js +85 -0
- package/esm/sql-objects/coalesce-statement.d.ts +22 -0
- package/esm/sql-objects/coalesce-statement.js +42 -0
- package/{dist/sql-objects/CountStatement.d.ts → esm/sql-objects/count-statement.d.ts} +3 -3
- package/esm/sql-objects/count-statement.js +31 -0
- package/{dist/sql-objects/Expression.d.ts → esm/sql-objects/expression.d.ts} +2 -2
- package/esm/sql-objects/expression.js +6 -0
- package/{dist/sql-objects/FieldExpression.d.ts → esm/sql-objects/field-expression.d.ts} +3 -3
- package/esm/sql-objects/field-expression.js +50 -0
- package/{dist/sql-objects/GroupColumn.d.ts → esm/sql-objects/group-column.d.ts} +3 -3
- package/esm/sql-objects/group-column.js +34 -0
- package/{dist/sql-objects/JoinStatement.d.ts → esm/sql-objects/join-statement.d.ts} +7 -7
- package/esm/sql-objects/join-statement.js +79 -0
- package/esm/sql-objects/lower-statement.d.ts +22 -0
- package/esm/sql-objects/lower-statement.js +37 -0
- package/esm/sql-objects/max-statement.d.ts +22 -0
- package/esm/sql-objects/max-statement.js +37 -0
- package/esm/sql-objects/min-statement.d.ts +22 -0
- package/esm/sql-objects/min-statement.js +37 -0
- package/{dist/sql-objects/Operator.d.ts → esm/sql-objects/operator.d.ts} +2 -2
- package/esm/sql-objects/operator.js +3 -0
- package/{dist/sql-objects/operators/CompOperator.d.ts → esm/sql-objects/operators/comp-operator.d.ts} +4 -4
- package/esm/sql-objects/operators/comp-operator.js +86 -0
- package/{dist/sql-objects/operators/LogicalOperator.d.ts → esm/sql-objects/operators/logical-operator.d.ts} +4 -4
- package/esm/sql-objects/operators/logical-operator.js +79 -0
- package/esm/sql-objects/operators/op-and.d.ts +5 -0
- package/esm/sql-objects/operators/op-and.js +5 -0
- package/{dist/sql-objects/operators/OpBetween.d.ts → esm/sql-objects/operators/op-between.d.ts} +4 -4
- package/esm/sql-objects/operators/op-between.js +31 -0
- package/{dist/sql-objects/operators/OpEq.d.ts → esm/sql-objects/operators/op-eq.d.ts} +3 -3
- package/esm/sql-objects/operators/op-eq.js +9 -0
- package/{dist/sql-objects/operators/OpExists.d.ts → esm/sql-objects/operators/op-exists.d.ts} +4 -4
- package/esm/sql-objects/operators/op-exists.js +26 -0
- package/{dist/sql-objects/operators/OpGt.d.ts → esm/sql-objects/operators/op-gt.d.ts} +3 -3
- package/esm/sql-objects/operators/op-gt.js +9 -0
- package/{dist/sql-objects/operators/OpGte.d.ts → esm/sql-objects/operators/op-gte.d.ts} +3 -3
- package/esm/sql-objects/operators/op-gte.js +9 -0
- package/{dist/sql-objects/operators/OpILike.d.ts → esm/sql-objects/operators/op-ilike.d.ts} +2 -2
- package/esm/sql-objects/operators/op-ilike.js +6 -0
- package/{dist/sql-objects/operators/OpIn.d.ts → esm/sql-objects/operators/op-in.d.ts} +3 -3
- package/esm/sql-objects/operators/op-in.js +15 -0
- package/{dist/sql-objects/operators/OpIsNot.d.ts → esm/sql-objects/operators/op-is-not.d.ts} +3 -3
- package/esm/sql-objects/operators/op-is-not.js +9 -0
- package/{dist/sql-objects/operators/OpIs.d.ts → esm/sql-objects/operators/op-is.d.ts} +3 -3
- package/esm/sql-objects/operators/op-is.js +9 -0
- package/{dist/sql-objects/operators/OpLike.d.ts → esm/sql-objects/operators/op-like.d.ts} +4 -4
- package/esm/sql-objects/operators/op-like.js +18 -0
- package/{dist/sql-objects/operators/OpLt.d.ts → esm/sql-objects/operators/op-lt.d.ts} +3 -3
- package/esm/sql-objects/operators/op-lt.js +9 -0
- package/{dist/sql-objects/operators/OpLte.d.ts → esm/sql-objects/operators/op-lte.d.ts} +3 -3
- package/esm/sql-objects/operators/op-lte.js +9 -0
- package/{dist/sql-objects/operators/OpNe.d.ts → esm/sql-objects/operators/op-ne.d.ts} +3 -3
- package/esm/sql-objects/operators/op-ne.js +9 -0
- package/{dist/sql-objects/operators/OpNotBetween.d.ts → esm/sql-objects/operators/op-not-between.d.ts} +2 -2
- package/esm/sql-objects/operators/op-not-between.js +6 -0
- package/{dist/sql-objects/operators/OpNotExists.d.ts → esm/sql-objects/operators/op-not-exists.d.ts} +2 -2
- package/esm/sql-objects/operators/op-not-exists.js +6 -0
- package/{dist/sql-objects/operators/OpNotILike.d.ts → esm/sql-objects/operators/op-not-ilike.d.ts} +2 -2
- package/esm/sql-objects/operators/op-not-ilike.js +6 -0
- package/{dist/sql-objects/operators/OpNotIn.d.ts → esm/sql-objects/operators/op-not-in.d.ts} +2 -2
- package/esm/sql-objects/operators/op-not-in.js +6 -0
- package/{dist/sql-objects/operators/OpNotLike.d.ts → esm/sql-objects/operators/op-not-like.d.ts} +2 -2
- package/esm/sql-objects/operators/op-not-like.js +6 -0
- package/esm/sql-objects/operators/op-or.d.ts +5 -0
- package/esm/sql-objects/operators/op-or.js +5 -0
- package/{dist/sql-objects/OrderColumn.d.ts → esm/sql-objects/order-column.d.ts} +3 -3
- package/esm/sql-objects/order-column.js +39 -0
- package/{dist/sql-objects/ParamExpression.d.ts → esm/sql-objects/param-expression.d.ts} +3 -3
- package/esm/sql-objects/param-expression.js +52 -0
- package/{dist/sql-objects/RawStatement.d.ts → esm/sql-objects/raw-statement.d.ts} +3 -3
- package/esm/sql-objects/raw-statement.js +15 -0
- package/{dist/sql-objects/ReturningColumn.d.ts → esm/sql-objects/returning-column.d.ts} +3 -3
- package/esm/sql-objects/returning-column.js +29 -0
- package/esm/sql-objects/sequence-getter-statement.d.ts +24 -0
- package/esm/sql-objects/sequence-getter-statement.js +47 -0
- package/esm/sql-objects/string-agg-statement.d.ts +31 -0
- package/esm/sql-objects/string-agg-statement.js +78 -0
- package/{dist/sql-objects/TableName.d.ts → esm/sql-objects/table-name.d.ts} +3 -3
- package/esm/sql-objects/table-name.js +30 -0
- package/esm/sql-objects/upper-statement.d.ts +22 -0
- package/esm/sql-objects/upper-statement.js +37 -0
- package/esm/sqlobject.initializers.d.ts +54 -0
- package/esm/sqlobject.initializers.js +101 -0
- package/{dist → esm}/typeguards.d.ts +18 -17
- package/esm/typeguards.js +57 -0
- package/{dist → esm}/types.d.ts +2 -2
- package/esm/types.js +1 -0
- package/package.json +49 -34
- package/dist/classes.d.ts +0 -38
- package/dist/classes.js +0 -41
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -27
- package/dist/sql-objects/BaseField.js +0 -11
- package/dist/sql-objects/Expression.js +0 -7
- package/dist/sql-objects/operators/OpAnd.d.ts +0 -5
- package/dist/sql-objects/operators/OpAnd.js +0 -12
- package/dist/sql-objects/operators/OpEq.js +0 -13
- package/dist/sql-objects/operators/OpGt.js +0 -13
- package/dist/sql-objects/operators/OpGte.js +0 -13
- package/dist/sql-objects/operators/OpILike.js +0 -13
- package/dist/sql-objects/operators/OpIn.js +0 -19
- package/dist/sql-objects/operators/OpIs.js +0 -13
- package/dist/sql-objects/operators/OpIsNot.js +0 -13
- package/dist/sql-objects/operators/OpLt.js +0 -13
- package/dist/sql-objects/operators/OpLte.js +0 -13
- package/dist/sql-objects/operators/OpNe.js +0 -13
- package/dist/sql-objects/operators/OpNotBetween.js +0 -13
- package/dist/sql-objects/operators/OpNotExists.js +0 -13
- package/dist/sql-objects/operators/OpNotILike.js +0 -13
- package/dist/sql-objects/operators/OpNotIn.js +0 -13
- package/dist/sql-objects/operators/OpNotLike.js +0 -13
- package/dist/sql-objects/operators/OpOr.d.ts +0 -5
- package/dist/sql-objects/operators/OpOr.js +0 -12
- package/dist/sqlobject.initializers.d.ts +0 -39
- package/dist/sqlobject.initializers.js +0 -90
- package/dist/typeguards.js +0 -73
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectQuery = void 0;
|
|
4
|
+
const putil_varhelpers_1 = require("putil-varhelpers");
|
|
5
|
+
const enums_js_1 = require("../enums.js");
|
|
6
|
+
const helpers_js_1 = require("../helpers.js");
|
|
7
|
+
const field_expression_js_1 = require("../sql-objects/field-expression.js");
|
|
8
|
+
const group_column_js_1 = require("../sql-objects/group-column.js");
|
|
9
|
+
const op_and_js_1 = require("../sql-objects/operators/op-and.js");
|
|
10
|
+
const order_column_js_1 = require("../sql-objects/order-column.js");
|
|
11
|
+
const table_name_js_1 = require("../sql-objects/table-name.js");
|
|
12
|
+
const typeguards_js_1 = require("../typeguards.js");
|
|
13
|
+
const query_js_1 = require("./query.js");
|
|
14
|
+
class SelectQuery extends query_js_1.Query {
|
|
15
|
+
_tables;
|
|
16
|
+
_columns;
|
|
17
|
+
_joins;
|
|
18
|
+
_where;
|
|
19
|
+
_groupBy;
|
|
20
|
+
_orderBy;
|
|
21
|
+
_limit;
|
|
22
|
+
_offset;
|
|
23
|
+
_alias;
|
|
24
|
+
_distinct;
|
|
25
|
+
constructor(...column) {
|
|
26
|
+
super();
|
|
27
|
+
if (column.length)
|
|
28
|
+
this.addColumn(...column);
|
|
29
|
+
}
|
|
30
|
+
get _type() {
|
|
31
|
+
return enums_js_1.SerializationType.SELECT_QUERY;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Adds columns to query.
|
|
35
|
+
*/
|
|
36
|
+
addColumn(...column) {
|
|
37
|
+
const self = this;
|
|
38
|
+
this._columns = this._columns || [];
|
|
39
|
+
for (const arg of column) {
|
|
40
|
+
if (!arg)
|
|
41
|
+
continue;
|
|
42
|
+
if (Array.isArray(arg))
|
|
43
|
+
self.addColumn(...arg);
|
|
44
|
+
else
|
|
45
|
+
this._columns.push((0, typeguards_js_1.isSerializable)(arg) ? arg : new field_expression_js_1.FieldExpression(arg));
|
|
46
|
+
}
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Defines "from" part of query.
|
|
51
|
+
*/
|
|
52
|
+
from(...table) {
|
|
53
|
+
this._tables = [];
|
|
54
|
+
for (const arg of table) {
|
|
55
|
+
if (!arg)
|
|
56
|
+
continue;
|
|
57
|
+
this._tables.push(typeof arg === 'string' ? new table_name_js_1.TableName(arg) : arg);
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Adds "join" statements to query
|
|
63
|
+
*/
|
|
64
|
+
join(...join) {
|
|
65
|
+
this._joins = this._joins || [];
|
|
66
|
+
for (const arg of join) {
|
|
67
|
+
if (!arg)
|
|
68
|
+
continue;
|
|
69
|
+
if (!(0, typeguards_js_1.isJoinStatement)(arg))
|
|
70
|
+
throw new TypeError('Join statement required');
|
|
71
|
+
this._joins.push(arg);
|
|
72
|
+
}
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Defines "where" part of query
|
|
77
|
+
*/
|
|
78
|
+
where(...condition) {
|
|
79
|
+
this._where = this._where || new op_and_js_1.OpAnd();
|
|
80
|
+
this._where.add(...condition);
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Defines "where" part of query
|
|
85
|
+
*/
|
|
86
|
+
groupBy(...field) {
|
|
87
|
+
this._groupBy = this._groupBy || [];
|
|
88
|
+
for (const arg of field) {
|
|
89
|
+
if (!arg)
|
|
90
|
+
continue;
|
|
91
|
+
this._groupBy.push(typeof arg === 'string' ? new group_column_js_1.GroupColumn(arg) : arg);
|
|
92
|
+
}
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Defines "order by" part of query.
|
|
97
|
+
*/
|
|
98
|
+
orderBy(...field) {
|
|
99
|
+
this._orderBy = this._orderBy || [];
|
|
100
|
+
for (const arg of field) {
|
|
101
|
+
if (!arg)
|
|
102
|
+
continue;
|
|
103
|
+
this._orderBy.push(typeof arg === 'string' ? new order_column_js_1.OrderColumn(arg) : arg);
|
|
104
|
+
}
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Sets alias for sub-select queries
|
|
109
|
+
*/
|
|
110
|
+
as(alias) {
|
|
111
|
+
this._alias = alias;
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Sets limit for query
|
|
116
|
+
*/
|
|
117
|
+
limit(limit) {
|
|
118
|
+
this._limit = (0, putil_varhelpers_1.coerceToInt)(limit);
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Sets offset for query
|
|
123
|
+
*/
|
|
124
|
+
offset(offset) {
|
|
125
|
+
this._offset = (0, putil_varhelpers_1.coerceToInt)(offset);
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Enables distinct mode
|
|
130
|
+
*/
|
|
131
|
+
distinct() {
|
|
132
|
+
this._distinct = true;
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
onFetch(listener) {
|
|
136
|
+
this.on('fetch', listener);
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
onceFetch(listener) {
|
|
140
|
+
this.once('fetch', listener);
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Performs serialization
|
|
145
|
+
*/
|
|
146
|
+
_serialize(ctx) {
|
|
147
|
+
const o = {
|
|
148
|
+
columns: this.__serializeSelectColumns(ctx),
|
|
149
|
+
from: this.__serializeFrom(ctx),
|
|
150
|
+
join: this.__serializeJoins(ctx),
|
|
151
|
+
where: this.__serializeWhere(ctx),
|
|
152
|
+
groupBy: this.__serializeGroupColumns(ctx),
|
|
153
|
+
orderBy: this.__serializeOrderColumns(ctx),
|
|
154
|
+
limit: this._limit,
|
|
155
|
+
offset: this._offset
|
|
156
|
+
};
|
|
157
|
+
return ctx.serialize(this._type, o, () => {
|
|
158
|
+
let out = 'select';
|
|
159
|
+
if (this._distinct)
|
|
160
|
+
out += ' distinct';
|
|
161
|
+
// columns part
|
|
162
|
+
/* istanbul ignore else */
|
|
163
|
+
if (o.columns) {
|
|
164
|
+
out += (o.columns.indexOf('\n') >= 0) ?
|
|
165
|
+
'\n\t' + o.columns + '\b' :
|
|
166
|
+
' ' + o.columns;
|
|
167
|
+
}
|
|
168
|
+
// from part
|
|
169
|
+
if (o.from) {
|
|
170
|
+
out += (o.columns.length > 60 ||
|
|
171
|
+
o.columns.indexOf('\n') >= 0 ? '\n' : ' ') +
|
|
172
|
+
o.from;
|
|
173
|
+
}
|
|
174
|
+
// join part
|
|
175
|
+
if (o.join)
|
|
176
|
+
out += '\n' + o.join;
|
|
177
|
+
// where part
|
|
178
|
+
if (o.where)
|
|
179
|
+
out += '\n' + o.where;
|
|
180
|
+
// group by part
|
|
181
|
+
if (o.groupBy)
|
|
182
|
+
out += '\n' + o.groupBy;
|
|
183
|
+
// order by part
|
|
184
|
+
if (o.orderBy)
|
|
185
|
+
out += '\n' + o.orderBy;
|
|
186
|
+
return out;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
__serializeSelectColumns(ctx) {
|
|
193
|
+
const arr = [];
|
|
194
|
+
if (this._columns)
|
|
195
|
+
for (const t of this._columns) {
|
|
196
|
+
const s = ctx.anyToSQL(t);
|
|
197
|
+
// t._serialize(ctx);
|
|
198
|
+
if (s) {
|
|
199
|
+
if (t instanceof SelectQuery) {
|
|
200
|
+
if (!t._alias)
|
|
201
|
+
throw new TypeError('Alias required for sub-select in columns');
|
|
202
|
+
arr.push(s + ' ' + t._alias);
|
|
203
|
+
}
|
|
204
|
+
else
|
|
205
|
+
arr.push(s);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return ctx.serialize(enums_js_1.SerializationType.SELECT_QUERY_COLUMNS, arr, () => (0, helpers_js_1.printArray)(arr) || '*');
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
__serializeFrom(ctx) {
|
|
214
|
+
const arr = [];
|
|
215
|
+
if (this._tables)
|
|
216
|
+
for (const t of this._tables) {
|
|
217
|
+
const s = t._serialize(ctx);
|
|
218
|
+
/* istanbul ignore else */
|
|
219
|
+
if (s) {
|
|
220
|
+
if (t instanceof SelectQuery) {
|
|
221
|
+
if (!t._alias)
|
|
222
|
+
throw new TypeError('Alias required for sub-select in "from"');
|
|
223
|
+
arr.push('\n\t(' + s + ') ' + t._alias);
|
|
224
|
+
}
|
|
225
|
+
else
|
|
226
|
+
arr.push(s);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return ctx.serialize(enums_js_1.SerializationType.SELECT_QUERY_FROM, arr, () => {
|
|
230
|
+
const s = arr.join(',');
|
|
231
|
+
return s ? ('from' + (s.substring(0, 1) !== '\n' ? ' ' : '') + s) : '';
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
__serializeJoins(ctx) {
|
|
238
|
+
const arr = [];
|
|
239
|
+
if (this._joins)
|
|
240
|
+
for (const t of this._joins) {
|
|
241
|
+
const s = t._serialize(ctx);
|
|
242
|
+
/* istanbul ignore else */
|
|
243
|
+
if (s)
|
|
244
|
+
arr.push(s);
|
|
245
|
+
}
|
|
246
|
+
return ctx.serialize(enums_js_1.SerializationType.SELECT_QUERY_JOIN, arr, () => {
|
|
247
|
+
return arr.join('\n');
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
__serializeWhere(ctx) {
|
|
254
|
+
if (!this._where)
|
|
255
|
+
return '';
|
|
256
|
+
const s = this._where._serialize(ctx);
|
|
257
|
+
return ctx.serialize(enums_js_1.SerializationType.CONDITIONS_BLOCK, s, () => {
|
|
258
|
+
/* istanbul ignore next */
|
|
259
|
+
return s ? 'where ' + s : '';
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
265
|
+
__serializeGroupColumns(ctx) {
|
|
266
|
+
const arr = [];
|
|
267
|
+
if (this._groupBy)
|
|
268
|
+
for (const t of this._groupBy) {
|
|
269
|
+
const s = t._serialize(ctx);
|
|
270
|
+
/* istanbul ignore else */
|
|
271
|
+
if (s)
|
|
272
|
+
arr.push(s);
|
|
273
|
+
}
|
|
274
|
+
return ctx.serialize(enums_js_1.SerializationType.SELECT_QUERY_GROUPBY, arr, () => {
|
|
275
|
+
const s = (0, helpers_js_1.printArray)(arr);
|
|
276
|
+
return s ? 'group by ' + s : '';
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
__serializeOrderColumns(ctx) {
|
|
280
|
+
const arr = [];
|
|
281
|
+
if (this._orderBy)
|
|
282
|
+
for (const t of this._orderBy) {
|
|
283
|
+
const s = t._serialize(ctx);
|
|
284
|
+
/* istanbul ignore else */
|
|
285
|
+
if (s)
|
|
286
|
+
arr.push(s);
|
|
287
|
+
}
|
|
288
|
+
return ctx.serialize(enums_js_1.SerializationType.SELECT_QUERY_ORDERBY, arr, () => {
|
|
289
|
+
const s = (0, helpers_js_1.printArray)(arr);
|
|
290
|
+
return s ? 'order by ' + s : '';
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
exports.SelectQuery = SelectQuery;
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateQuery = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
class UpdateQuery extends
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const helpers_js_1 = require("../helpers.js");
|
|
6
|
+
const op_and_js_1 = require("../sql-objects/operators/op-and.js");
|
|
7
|
+
const table_name_js_1 = require("../sql-objects/table-name.js");
|
|
8
|
+
const typeguards_js_1 = require("../typeguards.js");
|
|
9
|
+
const returning_query_js_1 = require("./returning-query.js");
|
|
10
|
+
class UpdateQuery extends returning_query_js_1.ReturningQuery {
|
|
11
|
+
_table;
|
|
12
|
+
_input;
|
|
13
|
+
_where;
|
|
11
14
|
constructor(tableName, input) {
|
|
12
15
|
super();
|
|
13
|
-
if (!tableName || !(typeof tableName === 'string' || (0,
|
|
16
|
+
if (!tableName || !(typeof tableName === 'string' || (0, typeguards_js_1.isRawStatement)(tableName)))
|
|
14
17
|
throw new TypeError('String or Raw instance required as first argument (tableName) for UpdateQuery');
|
|
15
18
|
if (!input || !((typeof input === 'object' && !Array.isArray(input)) ||
|
|
16
19
|
input.isSelect))
|
|
17
20
|
throw new TypeError('Object or Raw instance required as second argument (input) for UpdateQuery');
|
|
18
|
-
this._table = typeof tableName === 'string' ? new
|
|
21
|
+
this._table = typeof tableName === 'string' ? new table_name_js_1.TableName(tableName) : tableName;
|
|
19
22
|
this._input = input;
|
|
20
23
|
}
|
|
21
24
|
get _type() {
|
|
22
|
-
return
|
|
25
|
+
return enums_js_1.SerializationType.UPDATE_QUERY;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Defines "where" part of query
|
|
26
29
|
*/
|
|
27
30
|
where(...operator) {
|
|
28
|
-
this._where = this._where || new
|
|
31
|
+
this._where = this._where || new op_and_js_1.OpAnd();
|
|
29
32
|
this._where.add(...operator);
|
|
30
33
|
return this;
|
|
31
34
|
}
|
|
@@ -56,12 +59,12 @@ class UpdateQuery extends ReturningQuery_1.ReturningQuery {
|
|
|
56
59
|
const value = ctx.anyToSQL(allValues[n]);
|
|
57
60
|
arr.push({
|
|
58
61
|
field: n,
|
|
59
|
-
value
|
|
62
|
+
value
|
|
60
63
|
});
|
|
61
64
|
}
|
|
62
|
-
return ctx.serialize(
|
|
65
|
+
return ctx.serialize(enums_js_1.SerializationType.UPDATE_QUERY_VALUES, arr, () => {
|
|
63
66
|
const a = arr.map(o => o.field + ' = ' + o.value);
|
|
64
|
-
return (0,
|
|
67
|
+
return (0, helpers_js_1.printArray)(a, ',');
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
70
|
/**
|
|
@@ -71,7 +74,7 @@ class UpdateQuery extends ReturningQuery_1.ReturningQuery {
|
|
|
71
74
|
if (!this._where)
|
|
72
75
|
return '';
|
|
73
76
|
const s = this._where._serialize(ctx);
|
|
74
|
-
return ctx.serialize(
|
|
77
|
+
return ctx.serialize(enums_js_1.SerializationType.CONDITIONS_BLOCK, s, () => {
|
|
75
78
|
/* istanbul ignore next */
|
|
76
79
|
return s ? 'where ' + s : '';
|
|
77
80
|
});
|
|
File without changes
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SerializeContext = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const enums_js_1 = require("./enums.js");
|
|
5
|
+
const extensions_js_1 = require("./extensions.js");
|
|
6
|
+
const serializable_js_1 = require("./serializable.js");
|
|
7
|
+
const typeguards_js_1 = require("./typeguards.js");
|
|
7
8
|
class SerializeContext {
|
|
9
|
+
reservedWords = [
|
|
10
|
+
'schema', 'table', 'field', 'index', 'foreign', 'key',
|
|
11
|
+
'select', 'insert', 'update', 'delete', 'with', 'merge',
|
|
12
|
+
'join', 'inner', 'outer', 'left', 'right', 'full',
|
|
13
|
+
'from', 'where', 'order', 'by', 'group', 'having',
|
|
14
|
+
'acs', 'ascending', 'dsc', 'descending', 'distinct',
|
|
15
|
+
'and', 'or', 'not', 'between', 'null', 'like', 'ilike',
|
|
16
|
+
'count', 'sum', 'average', 'avg', 'cascade', 'authorization',
|
|
17
|
+
'create', 'add', 'drop', 'alter', 'index', 'private', 'sequence',
|
|
18
|
+
'default', 'constraint', 'references', 'primary', 'foreign',
|
|
19
|
+
'user', 'password'
|
|
20
|
+
];
|
|
21
|
+
dialect;
|
|
22
|
+
prettyPrint;
|
|
23
|
+
params;
|
|
24
|
+
dialectVersion;
|
|
25
|
+
strictParams;
|
|
26
|
+
serializeHooks;
|
|
27
|
+
paramOptions;
|
|
28
|
+
preparedParams;
|
|
29
|
+
returningFields;
|
|
30
|
+
strictParamGenId;
|
|
8
31
|
constructor(opts) {
|
|
9
|
-
this.reservedWords = [
|
|
10
|
-
'schema', 'table', 'field', 'index', 'foreign', 'key',
|
|
11
|
-
'select', 'insert', 'update', 'delete', 'with', 'merge',
|
|
12
|
-
'join', 'inner', 'outer', 'left', 'right', 'full',
|
|
13
|
-
'from', 'where', 'order', 'by', 'group', 'having',
|
|
14
|
-
'acs', 'ascending', 'dsc', 'descending', 'distinct',
|
|
15
|
-
'and', 'or', 'not', 'between', 'null', 'like', 'ilike',
|
|
16
|
-
'count', 'sum', 'average', 'avg', 'cascade', 'authorization',
|
|
17
|
-
'create', 'add', 'drop', 'alter', 'index', 'private', 'sequence',
|
|
18
|
-
'default', 'constraint', 'references', 'primary', 'foreign',
|
|
19
|
-
'user', 'password'
|
|
20
|
-
];
|
|
21
32
|
if (opts)
|
|
22
33
|
Object.assign(this, opts);
|
|
23
34
|
}
|
|
@@ -32,7 +43,7 @@ class SerializeContext {
|
|
|
32
43
|
return s;
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
|
-
for (const ext of
|
|
46
|
+
for (const ext of extensions_js_1.serializers) {
|
|
36
47
|
if (ext.dialect === this.dialect && ext.serialize) {
|
|
37
48
|
const s = ext.serialize(this, type, o, fallback);
|
|
38
49
|
if (s != null)
|
|
@@ -49,29 +60,29 @@ class SerializeContext {
|
|
|
49
60
|
return 'null';
|
|
50
61
|
if (Array.isArray(v)) {
|
|
51
62
|
const vv = v.map(x => this.anyToSQL(x));
|
|
52
|
-
return this.serialize(
|
|
63
|
+
return this.serialize(enums_js_1.SerializationType.ARRAY, vv, () => '(' + v.join(',')) + ')';
|
|
53
64
|
}
|
|
54
65
|
if (typeof v === 'object') {
|
|
55
|
-
if (
|
|
66
|
+
if ((0, typeguards_js_1.isSerializable)(v)) {
|
|
56
67
|
const s = v._serialize(this);
|
|
57
|
-
return s ? (
|
|
68
|
+
return s ? ((0, typeguards_js_1.isQuery)(v) || (0, typeguards_js_1.isLogicalOperator)(v) ? '(' + s + ')' : s) :
|
|
58
69
|
/* istanbul ignore next */
|
|
59
|
-
'
|
|
70
|
+
'';
|
|
60
71
|
}
|
|
61
72
|
if (v instanceof Date) {
|
|
62
|
-
return this.serialize(
|
|
73
|
+
return this.serialize(enums_js_1.SerializationType.DATE_VALUE, v, () => this.dateToSQL(v));
|
|
63
74
|
}
|
|
64
75
|
}
|
|
65
76
|
if (typeof v === 'string') {
|
|
66
|
-
return this.serialize(
|
|
77
|
+
return this.serialize(enums_js_1.SerializationType.STRING_VALUE, v, () => this.stringToSQL(v));
|
|
67
78
|
}
|
|
68
79
|
if (typeof v === 'boolean') {
|
|
69
|
-
return this.serialize(
|
|
80
|
+
return this.serialize(enums_js_1.SerializationType.BOOLEAN_VALUE, v, () => this.booleanToSQL(v));
|
|
70
81
|
}
|
|
71
82
|
if (typeof v === 'number') {
|
|
72
|
-
return this.serialize(
|
|
83
|
+
return this.serialize(enums_js_1.SerializationType.NUMBER_VALUE, v, () => this.numberToSQL(v));
|
|
73
84
|
}
|
|
74
|
-
if (v instanceof
|
|
85
|
+
if (v instanceof serializable_js_1.Serializable)
|
|
75
86
|
return v._serialize(this);
|
|
76
87
|
return v;
|
|
77
88
|
}
|
|
@@ -119,7 +130,7 @@ class SerializeContext {
|
|
|
119
130
|
return false;
|
|
120
131
|
if (this.reservedWords.includes(s.toLowerCase()))
|
|
121
132
|
return true;
|
|
122
|
-
for (const ext of
|
|
133
|
+
for (const ext of extensions_js_1.serializers) {
|
|
123
134
|
if (ext.dialect === this.dialect && ext.isReservedWord) {
|
|
124
135
|
if (ext.isReservedWord(this, s))
|
|
125
136
|
return true;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseField = void 0;
|
|
4
|
+
const expression_js_1 = require("./expression.js");
|
|
5
|
+
class BaseField extends expression_js_1.Expression {
|
|
6
|
+
_field = '';
|
|
7
|
+
_schema;
|
|
8
|
+
_table;
|
|
9
|
+
_descending;
|
|
10
|
+
}
|
|
11
|
+
exports.BaseField = BaseField;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CaseStatement = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
class CaseStatement extends
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const serializable_js_1 = require("../serializable.js");
|
|
6
|
+
const op_and_js_1 = require("./operators/op-and.js");
|
|
7
|
+
class CaseStatement extends serializable_js_1.Serializable {
|
|
8
|
+
_expressions;
|
|
9
|
+
_elseValue;
|
|
10
|
+
_condition;
|
|
11
|
+
_alias;
|
|
8
12
|
constructor() {
|
|
9
13
|
super();
|
|
10
14
|
this._expressions = [];
|
|
11
15
|
}
|
|
12
16
|
get _type() {
|
|
13
|
-
return
|
|
17
|
+
return enums_js_1.SerializationType.CASE_STATEMENT;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* Defines "when" part of Case expression.
|
|
17
21
|
*/
|
|
18
22
|
when(...condition) {
|
|
19
23
|
if (condition.length)
|
|
20
|
-
this._condition = new
|
|
24
|
+
this._condition = new op_and_js_1.OpAnd(...condition);
|
|
21
25
|
else
|
|
22
26
|
this._condition = undefined;
|
|
23
27
|
return this;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoalesceStatement = void 0;
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const serializable_js_1 = require("../serializable.js");
|
|
6
|
+
class CoalesceStatement extends serializable_js_1.Serializable {
|
|
7
|
+
_expressions;
|
|
8
|
+
_alias;
|
|
9
|
+
constructor(...expressions) {
|
|
10
|
+
super();
|
|
11
|
+
this._expressions = expressions;
|
|
12
|
+
}
|
|
13
|
+
get _type() {
|
|
14
|
+
return enums_js_1.SerializationType.COALESCE_STATEMENT;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Sets alias to case expression.
|
|
18
|
+
*/
|
|
19
|
+
as(alias) {
|
|
20
|
+
this._alias = alias;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Performs serialization
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} ctx
|
|
27
|
+
* @return {string}
|
|
28
|
+
* @override
|
|
29
|
+
*/
|
|
30
|
+
_serialize(ctx) {
|
|
31
|
+
if (!this._expressions.length)
|
|
32
|
+
return '';
|
|
33
|
+
const q = {
|
|
34
|
+
expressions: [],
|
|
35
|
+
};
|
|
36
|
+
for (const x of this._expressions) {
|
|
37
|
+
q.expressions.push(ctx.anyToSQL(x));
|
|
38
|
+
}
|
|
39
|
+
return ctx.serialize(this._type, q, () => this.__defaultSerialize(ctx, q));
|
|
40
|
+
}
|
|
41
|
+
__defaultSerialize(ctx, o) {
|
|
42
|
+
return 'coalesce(' + o.expressions.join(', ') + ')' +
|
|
43
|
+
(this._alias ? ' ' + this._alias : '');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.CoalesceStatement = CoalesceStatement;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CountStatement = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
class CountStatement extends
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const serializable_js_1 = require("../serializable.js");
|
|
6
|
+
class CountStatement extends serializable_js_1.Serializable {
|
|
7
|
+
_alias;
|
|
7
8
|
get _type() {
|
|
8
|
-
return
|
|
9
|
+
return enums_js_1.SerializationType.COUNT_STATEMENT;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Sets alias to case expression.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Expression = void 0;
|
|
4
|
+
const serializable_js_1 = require("../serializable.js");
|
|
5
|
+
class Expression extends serializable_js_1.Serializable {
|
|
6
|
+
_dataType;
|
|
7
|
+
_isArray;
|
|
8
|
+
_isDataSet;
|
|
9
|
+
}
|
|
10
|
+
exports.Expression = Expression;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldExpression = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const base_field_js_1 = require("./base-field.js");
|
|
6
6
|
const TABLE_COLUMN_PATTERN = /^((?:[a-zA-Z_][\w$_]*\.){0,2}) *([0-9a-zA-Z_][\w$_]*|\*) *(?:as)? *([a-zA-Z_][\w$_]*)?$/;
|
|
7
|
-
class FieldExpression extends
|
|
7
|
+
class FieldExpression extends base_field_js_1.BaseField {
|
|
8
|
+
_alias;
|
|
8
9
|
constructor(arg0, arg1, arg2) {
|
|
9
10
|
super();
|
|
10
11
|
let expression;
|
|
@@ -31,7 +32,7 @@ class FieldExpression extends BaseField_1.BaseField {
|
|
|
31
32
|
this._alias = this._field !== '*' ? m[3] : '';
|
|
32
33
|
}
|
|
33
34
|
get _type() {
|
|
34
|
-
return
|
|
35
|
+
return enums_js_1.SerializationType.SELECT_COLUMN;
|
|
35
36
|
}
|
|
36
37
|
_serialize(ctx) {
|
|
37
38
|
const o = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GroupColumn = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const enums_js_1 = require("../enums.js");
|
|
5
|
+
const base_field_js_1 = require("./base-field.js");
|
|
6
6
|
const GROUP_COLUMN_PATTERN = /^((?:[a-zA-Z][\w$]*\.){0,2})([\w$]*)$/;
|
|
7
|
-
class GroupColumn extends
|
|
7
|
+
class GroupColumn extends base_field_js_1.BaseField {
|
|
8
8
|
constructor(value) {
|
|
9
9
|
super();
|
|
10
10
|
const m = value.match(GROUP_COLUMN_PATTERN);
|
|
@@ -19,7 +19,7 @@ class GroupColumn extends BaseField_1.BaseField {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
get _type() {
|
|
22
|
-
return
|
|
22
|
+
return enums_js_1.SerializationType.GROUP_COLUMN;
|
|
23
23
|
}
|
|
24
24
|
_serialize(ctx) {
|
|
25
25
|
const o = {
|