typesql-cli 0.9.6 → 0.10.1
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 -3
- package/cli.js +76 -78
- package/cli.js.map +1 -1
- package/code-generator.d.ts +7 -7
- package/code-generator.d.ts.map +1 -1
- package/code-generator.js +193 -194
- package/code-generator.js.map +1 -1
- package/describe-dynamic-query.d.ts +1 -1
- package/describe-dynamic-query.d.ts.map +1 -1
- package/describe-dynamic-query.js +47 -42
- package/describe-dynamic-query.js.map +1 -1
- package/describe-nested-query.d.ts +2 -2
- package/describe-nested-query.d.ts.map +1 -1
- package/describe-nested-query.js +28 -25
- package/describe-nested-query.js.map +1 -1
- package/describe-query.d.ts +4 -4
- package/describe-query.d.ts.map +1 -1
- package/describe-query.js +24 -25
- package/describe-query.js.map +1 -1
- package/drivers/libsql.d.ts +2 -2
- package/drivers/libsql.d.ts.map +1 -1
- package/drivers/libsql.js +4 -5
- package/drivers/libsql.js.map +1 -1
- package/mysql-mapping.d.ts +1 -1
- package/mysql-mapping.d.ts.map +1 -1
- package/mysql-mapping.js +13 -13
- package/mysql-mapping.js.map +1 -1
- package/mysql-query-analyzer/collect-constraints.d.ts +4 -4
- package/mysql-query-analyzer/collect-constraints.d.ts.map +1 -1
- package/mysql-query-analyzer/collect-constraints.js +29 -31
- package/mysql-query-analyzer/collect-constraints.js.map +1 -1
- package/mysql-query-analyzer/infer-column-nullability.d.ts +2 -2
- package/mysql-query-analyzer/infer-column-nullability.d.ts.map +1 -1
- package/mysql-query-analyzer/infer-column-nullability.js +61 -63
- package/mysql-query-analyzer/infer-column-nullability.js.map +1 -1
- package/mysql-query-analyzer/infer-param-nullability.d.ts +2 -2
- package/mysql-query-analyzer/infer-param-nullability.d.ts.map +1 -1
- package/mysql-query-analyzer/infer-param-nullability.js +13 -14
- package/mysql-query-analyzer/infer-param-nullability.js.map +1 -1
- package/mysql-query-analyzer/parse.d.ts +2 -2
- package/mysql-query-analyzer/parse.d.ts.map +1 -1
- package/mysql-query-analyzer/parse.js +42 -40
- package/mysql-query-analyzer/parse.js.map +1 -1
- package/mysql-query-analyzer/select-columns.d.ts +4 -4
- package/mysql-query-analyzer/select-columns.d.ts.map +1 -1
- package/mysql-query-analyzer/select-columns.js +70 -65
- package/mysql-query-analyzer/select-columns.js.map +1 -1
- package/mysql-query-analyzer/traverse.d.ts +4 -4
- package/mysql-query-analyzer/traverse.d.ts.map +1 -1
- package/mysql-query-analyzer/traverse.js +211 -188
- package/mysql-query-analyzer/traverse.js.map +1 -1
- package/mysql-query-analyzer/types.d.ts +5 -5
- package/mysql-query-analyzer/types.d.ts.map +1 -1
- package/mysql-query-analyzer/unify.d.ts +2 -2
- package/mysql-query-analyzer/unify.d.ts.map +1 -1
- package/mysql-query-analyzer/unify.js +485 -487
- package/mysql-query-analyzer/unify.js.map +1 -1
- package/mysql-query-analyzer/util.d.ts.map +1 -1
- package/mysql-query-analyzer/util.js +4 -6
- package/mysql-query-analyzer/util.js.map +1 -1
- package/mysql-query-analyzer/verify-multiple-result.d.ts +2 -2
- package/mysql-query-analyzer/verify-multiple-result.d.ts.map +1 -1
- package/mysql-query-analyzer/verify-multiple-result.js +9 -9
- package/mysql-query-analyzer/verify-multiple-result.js.map +1 -1
- package/package.json +46 -44
- package/queryExectutor.d.ts +4 -4
- package/queryExectutor.d.ts.map +1 -1
- package/queryExectutor.js +48 -51
- package/queryExectutor.js.map +1 -1
- package/sql-generator.d.ts +2 -2
- package/sql-generator.d.ts.map +1 -1
- package/sql-generator.js +30 -29
- package/sql-generator.js.map +1 -1
- package/sqlite-query-analyzer/code-generator.d.ts +6 -6
- package/sqlite-query-analyzer/code-generator.d.ts.map +1 -1
- package/sqlite-query-analyzer/code-generator.js +226 -177
- package/sqlite-query-analyzer/code-generator.js.map +1 -1
- package/sqlite-query-analyzer/parser.d.ts +4 -4
- package/sqlite-query-analyzer/parser.d.ts.map +1 -1
- package/sqlite-query-analyzer/parser.js +17 -18
- package/sqlite-query-analyzer/parser.js.map +1 -1
- package/sqlite-query-analyzer/query-executor.d.ts +6 -6
- package/sqlite-query-analyzer/query-executor.d.ts.map +1 -1
- package/sqlite-query-analyzer/query-executor.js +42 -33
- package/sqlite-query-analyzer/query-executor.js.map +1 -1
- package/sqlite-query-analyzer/replace-list-params.d.ts +1 -1
- package/sqlite-query-analyzer/replace-list-params.d.ts.map +1 -1
- package/sqlite-query-analyzer/replace-list-params.js +5 -5
- package/sqlite-query-analyzer/replace-list-params.js.map +1 -1
- package/sqlite-query-analyzer/sqlite-describe-nested-query.d.ts +4 -4
- package/sqlite-query-analyzer/sqlite-describe-nested-query.d.ts.map +1 -1
- package/sqlite-query-analyzer/sqlite-describe-nested-query.js +19 -17
- package/sqlite-query-analyzer/sqlite-describe-nested-query.js.map +1 -1
- package/sqlite-query-analyzer/traverse.d.ts +5 -5
- package/sqlite-query-analyzer/traverse.d.ts.map +1 -1
- package/sqlite-query-analyzer/traverse.js +185 -155
- package/sqlite-query-analyzer/traverse.js.map +1 -1
- package/ts-dynamic-query-descriptor.d.ts +1 -1
- package/ts-dynamic-query-descriptor.d.ts.map +1 -1
- package/ts-dynamic-query-descriptor.js +7 -8
- package/ts-dynamic-query-descriptor.js.map +1 -1
- package/ts-nested-descriptor.d.ts +4 -4
- package/ts-nested-descriptor.d.ts.map +1 -1
- package/ts-nested-descriptor.js +13 -14
- package/ts-nested-descriptor.js.map +1 -1
- package/types.d.ts +18 -15
- package/types.d.ts.map +1 -1
- package/util.d.ts.map +1 -1
- package/util.js.map +1 -1
- package/utility-types.d.ts.map +1 -1
@@ -1,16 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.unify = unify;
|
4
|
+
exports.substitute = substitute;
|
5
|
+
exports.unionTypeResult = unionTypeResult;
|
4
6
|
function unify(constraints, substitutions) {
|
5
7
|
for (const constraint of constraints) {
|
6
8
|
unifyOne(constraint, substitutions);
|
7
9
|
}
|
8
10
|
}
|
9
|
-
exports.unify = unify;
|
10
11
|
function unifyOne(constraint, substitutions) {
|
11
12
|
const ty1 = substitute(constraint.type1, substitutions);
|
12
13
|
const ty2 = substitute(constraint.type2, substitutions);
|
13
|
-
if (ty1.kind
|
14
|
+
if (ty1.kind === 'TypeOperator' && ty2.kind === 'TypeOperator') {
|
14
15
|
ty1.types.forEach((t, i) => {
|
15
16
|
const newConstr = {
|
16
17
|
expression: 'list',
|
@@ -20,20 +21,20 @@ function unifyOne(constraint, substitutions) {
|
|
20
21
|
unifyOne(newConstr, substitutions);
|
21
22
|
});
|
22
23
|
}
|
23
|
-
else if (ty1.kind
|
24
|
+
else if (ty1.kind === 'TypeVar' && ty2.kind === 'TypeVar') {
|
24
25
|
// if (ty1.id == ty2.id) return;
|
25
|
-
if (ty1.type
|
26
|
-
if (ty2.type
|
26
|
+
if (ty1.type !== '?') {
|
27
|
+
if (ty2.type !== '?') {
|
27
28
|
const bestType = getBestPossibleType(ty1.type, ty2.type, constraint.mostGeneralType, constraint.coercionType);
|
28
29
|
substitutions[ty1.id] = Object.assign(Object.assign({}, ty1), { type: bestType });
|
29
30
|
}
|
30
31
|
else {
|
31
32
|
//type2 = ?
|
32
33
|
let newType = ty1.type;
|
33
|
-
if (constraint.coercionType
|
34
|
+
if (constraint.coercionType === 'Sum') {
|
34
35
|
newType = 'double';
|
35
36
|
}
|
36
|
-
if (constraint.coercionType
|
37
|
+
if (constraint.coercionType === 'Coalesce') {
|
37
38
|
newType = 'any';
|
38
39
|
}
|
39
40
|
substitutions[ty2.id] = Object.assign(Object.assign({}, ty1), { list: ty2.list, type: newType });
|
@@ -42,12 +43,12 @@ function unifyOne(constraint, substitutions) {
|
|
42
43
|
}
|
43
44
|
else {
|
44
45
|
ty2.list = ty1.list;
|
45
|
-
if (constraint.coercionType
|
46
|
+
if (constraint.coercionType === 'SumFunction') {
|
46
47
|
const bestType = getSumFunctionType(ty2.type);
|
47
48
|
substitutions[ty1.id] = Object.assign(Object.assign({}, ty2), { type: bestType });
|
48
49
|
substitutions[ty2.id] = Object.assign(Object.assign({}, ty2), { type: bestType });
|
49
50
|
}
|
50
|
-
else if (constraint.coercionType
|
51
|
+
else if (constraint.coercionType === 'Sum') {
|
51
52
|
const bestType = getSumType(ty2.type);
|
52
53
|
substitutions[ty1.id] = Object.assign(Object.assign({}, ty2), { type: bestType });
|
53
54
|
substitutions[ty2.id] = Object.assign(Object.assign({}, ty2), { type: bestType });
|
@@ -58,14 +59,14 @@ function unifyOne(constraint, substitutions) {
|
|
58
59
|
}
|
59
60
|
}
|
60
61
|
//todo - remove
|
61
|
-
else if (ty1.kind
|
62
|
-
ty2.types.forEach(t => {
|
62
|
+
else if (ty1.kind === 'TypeVar' && ty2.kind === 'TypeOperator') {
|
63
|
+
ty2.types.forEach((t) => {
|
63
64
|
t.list = true;
|
64
65
|
const newContraint = Object.assign(Object.assign({}, constraint), { type1: ty1, type2: t });
|
65
66
|
unifyOne(newContraint, substitutions);
|
66
67
|
});
|
67
68
|
}
|
68
|
-
if (ty1.kind
|
69
|
+
if (ty1.kind === 'TypeOperator' && ty2.kind === 'TypeVar') {
|
69
70
|
const newConstraint = Object.assign(Object.assign({}, constraint), { type1: ty2, type2: ty1 });
|
70
71
|
unifyOne(newConstraint, substitutions);
|
71
72
|
}
|
@@ -86,16 +87,14 @@ function getSumFunctionType(type) {
|
|
86
87
|
if (exactValueNumbers.indexOf(type) >= 0) {
|
87
88
|
return 'decimal';
|
88
89
|
}
|
89
|
-
|
90
|
-
return 'double';
|
91
|
-
}
|
90
|
+
return 'double';
|
92
91
|
}
|
93
92
|
function getBestPossibleType(type1, type2, max, coercionType) {
|
94
93
|
// Is possible to convert text to date
|
95
94
|
const sqliteDateCoercionOrder = ['TEXT', 'DATE'];
|
96
95
|
const sqliteIndexDateType1 = sqliteDateCoercionOrder.indexOf(type1);
|
97
96
|
const sqliteIndexDateType2 = sqliteDateCoercionOrder.indexOf(type2);
|
98
|
-
if (sqliteIndexDateType1
|
97
|
+
if (sqliteIndexDateType1 !== -1 && sqliteIndexDateType1 !== -1) {
|
99
98
|
const index = Math.max(sqliteIndexDateType1, sqliteIndexDateType2);
|
100
99
|
return sqliteDateCoercionOrder[index];
|
101
100
|
}
|
@@ -103,50 +102,49 @@ function getBestPossibleType(type1, type2, max, coercionType) {
|
|
103
102
|
const sqliteNumberCoercionOrder = ['INTEGER', 'REAL', 'NUMERIC'];
|
104
103
|
const sqliteIndexNumberType1 = sqliteNumberCoercionOrder.indexOf(type1);
|
105
104
|
const sqliteIndexNumberType2 = sqliteNumberCoercionOrder.indexOf(type2);
|
106
|
-
if (sqliteIndexNumberType1
|
105
|
+
if (sqliteIndexNumberType1 !== -1 && sqliteIndexNumberType2 !== -1) {
|
107
106
|
const index = max ? Math.max(sqliteIndexNumberType1, sqliteIndexNumberType2) : Math.min(sqliteIndexNumberType1, sqliteIndexNumberType2);
|
108
107
|
return sqliteNumberCoercionOrder[index];
|
109
108
|
}
|
110
|
-
if (coercionType
|
109
|
+
if (coercionType === 'Union') {
|
111
110
|
const unionType = unionTypeResult(type1, type2);
|
112
111
|
return unionType;
|
113
112
|
}
|
114
|
-
if (coercionType
|
113
|
+
if (coercionType === 'SumFunction') {
|
115
114
|
const exactValueNumbers = ['int', 'bigint', 'decimal'];
|
116
115
|
if (exactValueNumbers.indexOf(type2) >= 0) {
|
117
116
|
return 'decimal';
|
118
117
|
}
|
119
|
-
|
120
|
-
return 'double';
|
121
|
-
}
|
118
|
+
return 'double';
|
122
119
|
}
|
123
|
-
if (coercionType
|
120
|
+
if (coercionType === 'Ceiling' && (type1 === 'decimal' || type2 === 'decimal')) {
|
121
|
+
//ceiling(decimal) returns bigint
|
124
122
|
return 'bigint';
|
125
123
|
}
|
126
|
-
if (type1
|
127
|
-
return coercionType
|
124
|
+
if (type1 === 'any') {
|
125
|
+
return coercionType === 'Coalesce' ? type2 : type2;
|
128
126
|
}
|
129
|
-
if (type2
|
130
|
-
return coercionType
|
127
|
+
if (type2 === 'any') {
|
128
|
+
return coercionType === 'Coalesce' ? 'any' : type1;
|
131
129
|
}
|
132
|
-
if (coercionType
|
130
|
+
if (coercionType === 'Sum' && isNumericType(type1) && isNumericType(type2) && (type1 === 'number' || type2 === 'number'))
|
133
131
|
return 'double';
|
134
|
-
if (coercionType
|
132
|
+
if (coercionType === 'Sum' && max && type1 === 'int' && type2 === 'int')
|
135
133
|
return 'bigint';
|
136
|
-
if (coercionType
|
134
|
+
if (coercionType === 'Sum' && max && type1 === 'date' && type2 === 'date')
|
137
135
|
return 'bigint';
|
138
136
|
//enum
|
139
|
-
if (type1
|
137
|
+
if (type1 === type2) {
|
140
138
|
return type1;
|
141
139
|
}
|
142
140
|
const order = ['number', 'bit', 'tinyint', 'year', 'smallint', 'int', 'bigint', 'decimal', 'float', 'double', 'varchar'];
|
143
141
|
const indexType1 = order.indexOf(type1);
|
144
142
|
const indexType2 = order.indexOf(type2);
|
145
|
-
if (indexType1
|
143
|
+
if (indexType1 !== -1 && indexType2 !== -1) {
|
146
144
|
const index = max ? Math.max(indexType1, indexType2) : Math.min(indexType1, indexType2);
|
147
145
|
const resultType = order[index];
|
148
|
-
if (resultType
|
149
|
-
throw Error(
|
146
|
+
if (resultType === 'varchar' && coercionType === 'Numeric') {
|
147
|
+
throw Error(`Type mismatch: ${type1} and ${type2}`);
|
150
148
|
}
|
151
149
|
return resultType;
|
152
150
|
}
|
@@ -155,7 +153,7 @@ function getBestPossibleType(type1, type2, max, coercionType) {
|
|
155
153
|
const order2 = ['char', 'varchar', 'tinytext', 'mediumtext', 'text', 'longtext'];
|
156
154
|
const indexStrType1 = order2.indexOf(newType1);
|
157
155
|
const indexStrType2 = order2.indexOf(newType2);
|
158
|
-
if (indexStrType1
|
156
|
+
if (indexStrType1 !== -1 && indexStrType2 !== -1) {
|
159
157
|
const index = max ? Math.max(indexStrType1, indexStrType2) : Math.min(indexStrType1, indexStrType2);
|
160
158
|
return order2[index];
|
161
159
|
}
|
@@ -163,7 +161,7 @@ function getBestPossibleType(type1, type2, max, coercionType) {
|
|
163
161
|
const dateTypeOrder = ['date', 'datetime'];
|
164
162
|
const indexDateType1 = dateTypeOrder.indexOf(type1);
|
165
163
|
const indexDateType2 = dateTypeOrder.indexOf(type2);
|
166
|
-
if (indexDateType1
|
164
|
+
if (indexDateType1 !== -1 && indexDateType2 !== -1) {
|
167
165
|
const index = max ? Math.max(indexDateType1, indexDateType2) : Math.min(indexDateType1, indexDateType2);
|
168
166
|
return dateTypeOrder[index];
|
169
167
|
}
|
@@ -171,27 +169,27 @@ function getBestPossibleType(type1, type2, max, coercionType) {
|
|
171
169
|
const dateTypeLiteralOrder = ['time', 'datetime'];
|
172
170
|
const indexDateLiteralType1 = dateTypeLiteralOrder.indexOf(type1);
|
173
171
|
const indexDateLiteralType2 = dateTypeLiteralOrder.indexOf(type2);
|
174
|
-
if (indexDateLiteralType1
|
172
|
+
if (indexDateLiteralType1 !== -1 && indexDateLiteralType2 !== -1) {
|
175
173
|
const index = max ? Math.max(indexDateLiteralType1, indexDateLiteralType2) : Math.min(indexDateLiteralType1, indexDateLiteralType2);
|
176
174
|
return dateTypeLiteralOrder[index];
|
177
175
|
}
|
178
|
-
throw Error(
|
176
|
+
throw Error(`Type mismatch: ${type1} and ${type2}`);
|
179
177
|
}
|
180
178
|
function substitute(type, substitutions) {
|
181
|
-
if (type.kind
|
179
|
+
if (type.kind === 'TypeVar' && type.type !== '?') {
|
182
180
|
const subs = substitutions[type.id];
|
183
181
|
if (subs) {
|
184
|
-
if (type.id
|
182
|
+
if (type.id !== subs.id) {
|
185
183
|
return substitute(subs, substitutions);
|
186
184
|
}
|
187
185
|
return subs;
|
188
186
|
}
|
189
187
|
return type;
|
190
188
|
}
|
191
|
-
if (type.kind
|
189
|
+
if (type.kind === 'TypeVar' && type.type === '?') {
|
192
190
|
const subs = substitutions[type.id];
|
193
191
|
if (subs) {
|
194
|
-
if (type.id
|
192
|
+
if (type.id !== subs.id) {
|
195
193
|
return substitute(subs, substitutions);
|
196
194
|
}
|
197
195
|
return subs;
|
@@ -200,7 +198,6 @@ function substitute(type, substitutions) {
|
|
200
198
|
}
|
201
199
|
return type;
|
202
200
|
}
|
203
|
-
exports.substitute = substitute;
|
204
201
|
function isNumericType(type) {
|
205
202
|
const numericTypes = ['number', 'tinyint', 'year', 'smallint', 'int', 'bigint', 'decimal', 'float', 'double'];
|
206
203
|
return numericTypes.indexOf(type) >= 0;
|
@@ -208,456 +205,457 @@ function isNumericType(type) {
|
|
208
205
|
function unionTypeResult(type1, type2) {
|
209
206
|
//Gernerated with tests\check-mysql-inference.ts
|
210
207
|
const typeMapping = {
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
208
|
+
number_int: 'int',
|
209
|
+
bigint_number: 'bigint',
|
210
|
+
decimal_tinyint: 'decimal',
|
211
|
+
decimal_smallint: 'decimal',
|
212
|
+
decimal_int: 'decimal',
|
213
|
+
decimal_float: 'double',
|
214
|
+
decimal_double: 'double',
|
215
|
+
decimal_timestamp: 'varchar',
|
216
|
+
decimal_bigint: 'decimal',
|
217
|
+
decimal_mediumint: 'decimal',
|
218
|
+
decimal_date: 'varchar',
|
219
|
+
decimal_time: 'varchar',
|
220
|
+
decimal_datetime: 'varchar',
|
221
|
+
decimal_year: 'decimal',
|
222
|
+
decimal_varchar: 'varchar',
|
223
|
+
decimal_bit: 'decimal',
|
224
|
+
decimal_json: 'varbinary',
|
225
|
+
decimal_enum: 'varchar',
|
226
|
+
decimal_set: 'varchar',
|
227
|
+
decimal_tinyblob: 'text',
|
228
|
+
decimal_mediumblob: 'text',
|
229
|
+
decimal_longblob: 'longtext',
|
230
|
+
decimal_blob: 'text',
|
231
|
+
decimal_tinytext: 'text',
|
232
|
+
decimal_mediumtext: 'text',
|
233
|
+
decimal_longtext: 'longtext',
|
234
|
+
decimal_text: 'text',
|
235
|
+
decimal_varbinary: 'varbinary',
|
236
|
+
decimal_binary: 'binary',
|
237
|
+
decimal_char: 'binary',
|
238
|
+
decimal_geometry: 'varbinary',
|
239
|
+
tinyint_smallint: 'smallint',
|
240
|
+
tinyint_int: 'int',
|
241
|
+
tinyint_float: 'float',
|
242
|
+
tinyint_double: 'double',
|
243
|
+
tinyint_timestamp: 'varchar',
|
244
|
+
tinyint_bigint: 'bigint',
|
245
|
+
tinyint_mediumint: 'mediumint',
|
246
|
+
tinyint_date: 'varchar',
|
247
|
+
tinyint_time: 'varchar',
|
248
|
+
tinyint_datetime: 'varchar',
|
249
|
+
tinyint_year: 'tinyint',
|
250
|
+
tinyint_varchar: 'varchar',
|
251
|
+
tinyint_bit: 'decimal',
|
252
|
+
tinyint_json: 'varbinary',
|
253
|
+
tinyint_enum: 'varchar',
|
254
|
+
tinyint_set: 'varchar',
|
255
|
+
tinyint_tinyblob: 'text',
|
256
|
+
tinyint_mediumblob: 'text',
|
257
|
+
tinyint_longblob: 'longtext',
|
258
|
+
tinyint_blob: 'text',
|
259
|
+
tinyint_tinytext: 'text',
|
260
|
+
tinyint_mediumtext: 'text',
|
261
|
+
tinyint_longtext: 'longtext',
|
262
|
+
tinyint_text: 'text',
|
263
|
+
tinyint_varbinary: 'varbinary',
|
264
|
+
tinyint_binary: 'binary',
|
265
|
+
tinyint_char: 'binary',
|
266
|
+
tinyint_geometry: 'varbinary',
|
267
|
+
smallint_int: 'int',
|
268
|
+
smallint_float: 'float',
|
269
|
+
smallint_double: 'double',
|
270
|
+
smallint_timestamp: 'varchar',
|
271
|
+
smallint_bigint: 'bigint',
|
272
|
+
smallint_mediumint: 'mediumint',
|
273
|
+
smallint_date: 'varchar',
|
274
|
+
smallint_time: 'varchar',
|
275
|
+
smallint_datetime: 'varchar',
|
276
|
+
smallint_year: 'smallint',
|
277
|
+
smallint_varchar: 'varchar',
|
278
|
+
smallint_bit: 'decimal',
|
279
|
+
smallint_json: 'varbinary',
|
280
|
+
smallint_enum: 'varchar',
|
281
|
+
smallint_set: 'varchar',
|
282
|
+
smallint_tinyblob: 'text',
|
283
|
+
smallint_mediumblob: 'text',
|
284
|
+
smallint_longblob: 'longtext',
|
285
|
+
smallint_blob: 'text',
|
286
|
+
smallint_tinytext: 'text',
|
287
|
+
smallint_mediumtext: 'text',
|
288
|
+
smallint_longtext: 'longtext',
|
289
|
+
smallint_text: 'text',
|
290
|
+
smallint_varbinary: 'varbinary',
|
291
|
+
smallint_binary: 'binary',
|
292
|
+
smallint_char: 'binary',
|
293
|
+
smallint_geometry: 'varbinary',
|
294
|
+
int_float: 'double',
|
295
|
+
int_double: 'double',
|
296
|
+
int_timestamp: 'varchar',
|
297
|
+
int_bigint: 'bigint',
|
298
|
+
int_mediumint: 'int',
|
299
|
+
int_date: 'varchar',
|
300
|
+
int_time: 'varchar',
|
301
|
+
int_datetime: 'varchar',
|
302
|
+
int_year: 'int',
|
303
|
+
int_varchar: 'varchar',
|
304
|
+
int_bit: 'decimal',
|
305
|
+
int_json: 'varbinary',
|
306
|
+
int_enum: 'varchar',
|
307
|
+
int_set: 'varchar',
|
308
|
+
int_tinyblob: 'text',
|
309
|
+
int_mediumblob: 'text',
|
310
|
+
int_longblob: 'longtext',
|
311
|
+
int_blob: 'text',
|
312
|
+
int_tinytext: 'text',
|
313
|
+
int_mediumtext: 'text',
|
314
|
+
int_longtext: 'longtext',
|
315
|
+
int_text: 'text',
|
316
|
+
int_varbinary: 'varbinary',
|
317
|
+
int_binary: 'binary',
|
318
|
+
int_char: 'binary',
|
319
|
+
int_geometry: 'varbinary',
|
320
|
+
float_double: 'double',
|
321
|
+
float_timestamp: 'varchar',
|
322
|
+
float_bigint: 'float',
|
323
|
+
float_mediumint: 'float',
|
324
|
+
float_date: 'varchar',
|
325
|
+
float_time: 'varchar',
|
326
|
+
float_datetime: 'varchar',
|
327
|
+
float_year: 'float',
|
328
|
+
float_varchar: 'varchar',
|
329
|
+
float_bit: 'double',
|
330
|
+
float_json: 'varbinary',
|
331
|
+
float_enum: 'varchar',
|
332
|
+
float_set: 'varchar',
|
333
|
+
float_tinyblob: 'text',
|
334
|
+
float_mediumblob: 'text',
|
335
|
+
float_longblob: 'longtext',
|
336
|
+
float_blob: 'text',
|
337
|
+
float_tinytext: 'text',
|
338
|
+
float_mediumtext: 'text',
|
339
|
+
float_longtext: 'longtext',
|
340
|
+
float_text: 'text',
|
341
|
+
float_varbinary: 'varbinary',
|
342
|
+
float_binary: 'binary',
|
343
|
+
float_char: 'binary',
|
344
|
+
float_geometry: 'varbinary',
|
345
|
+
double_timestamp: 'varchar',
|
346
|
+
double_bigint: 'double',
|
347
|
+
double_mediumint: 'double',
|
348
|
+
double_date: 'varchar',
|
349
|
+
double_time: 'varchar',
|
350
|
+
double_datetime: 'varchar',
|
351
|
+
double_year: 'double',
|
352
|
+
double_varchar: 'varchar',
|
353
|
+
double_bit: 'double',
|
354
|
+
double_json: 'varbinary',
|
355
|
+
double_enum: 'varchar',
|
356
|
+
double_set: 'varchar',
|
357
|
+
double_tinyblob: 'text',
|
358
|
+
double_mediumblob: 'text',
|
359
|
+
double_longblob: 'longtext',
|
360
|
+
double_blob: 'text',
|
361
|
+
double_tinytext: 'text',
|
362
|
+
double_mediumtext: 'text',
|
363
|
+
double_longtext: 'longtext',
|
364
|
+
double_text: 'text',
|
365
|
+
double_varbinary: 'varbinary',
|
366
|
+
double_binary: 'binary',
|
367
|
+
double_char: 'binary',
|
368
|
+
double_geometry: 'varbinary',
|
369
|
+
timestamp_bigint: 'varchar',
|
370
|
+
timestamp_mediumint: 'varchar',
|
371
|
+
timestamp_date: 'datetime',
|
372
|
+
timestamp_time: 'datetime',
|
373
|
+
timestamp_datetime: 'datetime',
|
374
|
+
timestamp_year: 'varchar',
|
375
|
+
timestamp_varchar: 'varchar',
|
376
|
+
timestamp_bit: 'varbinary',
|
377
|
+
timestamp_json: 'varbinary',
|
378
|
+
timestamp_enum: 'varchar',
|
379
|
+
timestamp_set: 'varchar',
|
380
|
+
timestamp_tinyblob: 'text',
|
381
|
+
timestamp_mediumblob: 'text',
|
382
|
+
timestamp_longblob: 'longtext',
|
383
|
+
timestamp_blob: 'text',
|
384
|
+
timestamp_tinytext: 'text',
|
385
|
+
timestamp_mediumtext: 'text',
|
386
|
+
timestamp_longtext: 'longtext',
|
387
|
+
timestamp_text: 'text',
|
388
|
+
timestamp_varbinary: 'varbinary',
|
389
|
+
timestamp_binary: 'binary',
|
390
|
+
timestamp_char: 'binary',
|
391
|
+
timestamp_geometry: 'varbinary',
|
392
|
+
bigint_mediumint: 'bigint',
|
393
|
+
bigint_date: 'varchar',
|
394
|
+
bigint_time: 'varchar',
|
395
|
+
bigint_datetime: 'varchar',
|
396
|
+
bigint_year: 'bigint',
|
397
|
+
bigint_varchar: 'varchar',
|
398
|
+
bigint_bit: 'decimal',
|
399
|
+
bigint_json: 'varbinary',
|
400
|
+
bigint_enum: 'varchar',
|
401
|
+
bigint_set: 'varchar',
|
402
|
+
bigint_tinyblob: 'text',
|
403
|
+
bigint_mediumblob: 'text',
|
404
|
+
bigint_longblob: 'longtext',
|
405
|
+
bigint_blob: 'text',
|
406
|
+
bigint_tinytext: 'text',
|
407
|
+
bigint_mediumtext: 'text',
|
408
|
+
bigint_longtext: 'longtext',
|
409
|
+
bigint_text: 'text',
|
410
|
+
bigint_varbinary: 'varbinary',
|
411
|
+
bigint_binary: 'binary',
|
412
|
+
bigint_char: 'binary',
|
413
|
+
bigint_geometry: 'varbinary',
|
414
|
+
mediumint_date: 'varchar',
|
415
|
+
mediumint_time: 'varchar',
|
416
|
+
mediumint_datetime: 'varchar',
|
417
|
+
mediumint_year: 'mediumint',
|
418
|
+
mediumint_varchar: 'varchar',
|
419
|
+
mediumint_bit: 'decimal',
|
420
|
+
mediumint_json: 'varbinary',
|
421
|
+
mediumint_enum: 'varchar',
|
422
|
+
mediumint_set: 'varchar',
|
423
|
+
mediumint_tinyblob: 'text',
|
424
|
+
mediumint_mediumblob: 'text',
|
425
|
+
mediumint_longblob: 'longtext',
|
426
|
+
mediumint_blob: 'text',
|
427
|
+
mediumint_tinytext: 'text',
|
428
|
+
mediumint_mediumtext: 'text',
|
429
|
+
mediumint_longtext: 'longtext',
|
430
|
+
mediumint_text: 'text',
|
431
|
+
mediumint_varbinary: 'varbinary',
|
432
|
+
mediumint_binary: 'binary',
|
433
|
+
mediumint_char: 'binary',
|
434
|
+
mediumint_geometry: 'varbinary',
|
435
|
+
date_time: 'datetime',
|
436
|
+
date_datetime: 'datetime',
|
437
|
+
date_year: 'varchar',
|
438
|
+
date_varchar: 'varchar',
|
439
|
+
date_bit: 'varbinary',
|
440
|
+
date_json: 'varbinary',
|
441
|
+
date_enum: 'varchar',
|
442
|
+
date_set: 'varchar',
|
443
|
+
date_tinyblob: 'text',
|
444
|
+
date_mediumblob: 'text',
|
445
|
+
date_longblob: 'longtext',
|
446
|
+
date_blob: 'text',
|
447
|
+
date_tinytext: 'text',
|
448
|
+
date_mediumtext: 'text',
|
449
|
+
date_longtext: 'longtext',
|
450
|
+
date_text: 'text',
|
451
|
+
date_varbinary: 'varbinary',
|
452
|
+
date_binary: 'binary',
|
453
|
+
date_char: 'binary',
|
454
|
+
date_geometry: 'varbinary',
|
455
|
+
time_datetime: 'datetime',
|
456
|
+
time_year: 'varchar',
|
457
|
+
time_varchar: 'varchar',
|
458
|
+
time_bit: 'varbinary',
|
459
|
+
time_json: 'varbinary',
|
460
|
+
time_enum: 'varchar',
|
461
|
+
time_set: 'varchar',
|
462
|
+
time_tinyblob: 'text',
|
463
|
+
time_mediumblob: 'text',
|
464
|
+
time_longblob: 'longtext',
|
465
|
+
time_blob: 'text',
|
466
|
+
time_tinytext: 'text',
|
467
|
+
time_mediumtext: 'text',
|
468
|
+
time_longtext: 'longtext',
|
469
|
+
time_text: 'text',
|
470
|
+
time_varbinary: 'varbinary',
|
471
|
+
time_binary: 'binary',
|
472
|
+
time_char: 'binary',
|
473
|
+
time_geometry: 'varbinary',
|
474
|
+
datetime_year: 'varchar',
|
475
|
+
datetime_varchar: 'varchar',
|
476
|
+
datetime_bit: 'varbinary',
|
477
|
+
datetime_json: 'varbinary',
|
478
|
+
datetime_enum: 'varchar',
|
479
|
+
datetime_set: 'varchar',
|
480
|
+
datetime_tinyblob: 'text',
|
481
|
+
datetime_mediumblob: 'text',
|
482
|
+
datetime_longblob: 'longtext',
|
483
|
+
datetime_blob: 'text',
|
484
|
+
datetime_tinytext: 'text',
|
485
|
+
datetime_mediumtext: 'text',
|
486
|
+
datetime_longtext: 'longtext',
|
487
|
+
datetime_text: 'text',
|
488
|
+
datetime_varbinary: 'varbinary',
|
489
|
+
datetime_binary: 'binary',
|
490
|
+
datetime_char: 'binary',
|
491
|
+
datetime_geometry: 'varbinary',
|
492
|
+
year_varchar: 'varchar',
|
493
|
+
year_bit: 'bigint',
|
494
|
+
year_json: 'varbinary',
|
495
|
+
year_enum: 'varchar',
|
496
|
+
year_set: 'varchar',
|
497
|
+
year_tinyblob: 'text',
|
498
|
+
year_mediumblob: 'text',
|
499
|
+
year_longblob: 'longtext',
|
500
|
+
year_blob: 'text',
|
501
|
+
year_tinytext: 'text',
|
502
|
+
year_mediumtext: 'text',
|
503
|
+
year_longtext: 'longtext',
|
504
|
+
year_text: 'text',
|
505
|
+
year_varbinary: 'varbinary',
|
506
|
+
year_binary: 'binary',
|
507
|
+
year_char: 'binary',
|
508
|
+
year_geometry: 'varbinary',
|
509
|
+
varchar_bit: 'varbinary',
|
510
|
+
varchar_json: 'varbinary',
|
511
|
+
varchar_enum: 'varchar',
|
512
|
+
varchar_set: 'varchar',
|
513
|
+
varchar_tinyblob: 'text',
|
514
|
+
varchar_mediumblob: 'text',
|
515
|
+
varchar_longblob: 'longtext',
|
516
|
+
varchar_blob: 'text',
|
517
|
+
varchar_tinytext: 'text',
|
518
|
+
varchar_mediumtext: 'text',
|
519
|
+
varchar_longtext: 'longtext',
|
520
|
+
varchar_text: 'text',
|
521
|
+
varchar_varbinary: 'varbinary',
|
522
|
+
varchar_binary: 'varbinary',
|
523
|
+
varchar_char: 'varchar',
|
524
|
+
varchar_geometry: 'varbinary',
|
525
|
+
bit_json: 'varbinary',
|
526
|
+
bit_enum: 'varbinary',
|
527
|
+
bit_set: 'varbinary',
|
528
|
+
bit_tinyblob: 'text',
|
529
|
+
bit_mediumblob: 'text',
|
530
|
+
bit_longblob: 'longtext',
|
531
|
+
bit_blob: 'text',
|
532
|
+
bit_tinytext: 'tinytext',
|
533
|
+
bit_mediumtext: 'mediumtext',
|
534
|
+
bit_longtext: 'longtext',
|
535
|
+
bit_text: 'text',
|
536
|
+
bit_varbinary: 'varbinary',
|
537
|
+
bit_binary: 'binary',
|
538
|
+
bit_char: 'binary',
|
539
|
+
bit_geometry: 'varbinary',
|
540
|
+
json_enum: 'varbinary',
|
541
|
+
json_set: 'varbinary',
|
542
|
+
json_tinyblob: 'longtext',
|
543
|
+
json_mediumblob: 'longtext',
|
544
|
+
json_longblob: 'longtext',
|
545
|
+
json_blob: 'longtext',
|
546
|
+
json_tinytext: 'longtext',
|
547
|
+
json_mediumtext: 'longtext',
|
548
|
+
json_longtext: 'longtext',
|
549
|
+
json_text: 'longtext',
|
550
|
+
json_varbinary: 'varbinary',
|
551
|
+
json_binary: 'varbinary',
|
552
|
+
json_char: 'varbinary',
|
553
|
+
json_geometry: 'varbinary',
|
554
|
+
enum_set: 'varchar',
|
555
|
+
enum_tinyblob: 'text',
|
556
|
+
enum_mediumblob: 'text',
|
557
|
+
enum_longblob: 'longtext',
|
558
|
+
enum_blob: 'text',
|
559
|
+
enum_tinytext: 'text',
|
560
|
+
enum_mediumtext: 'text',
|
561
|
+
enum_longtext: 'longtext',
|
562
|
+
enum_text: 'text',
|
563
|
+
enum_varbinary: 'varbinary',
|
564
|
+
enum_binary: 'binary',
|
565
|
+
enum_char: 'binary',
|
566
|
+
enum_geometry: 'varbinary',
|
567
|
+
set_tinyblob: 'text',
|
568
|
+
set_mediumblob: 'text',
|
569
|
+
set_longblob: 'longtext',
|
570
|
+
set_blob: 'text',
|
571
|
+
set_tinytext: 'text',
|
572
|
+
set_mediumtext: 'text',
|
573
|
+
set_longtext: 'longtext',
|
574
|
+
set_text: 'text',
|
575
|
+
set_varbinary: 'varbinary',
|
576
|
+
set_binary: 'binary',
|
577
|
+
set_char: 'binary',
|
578
|
+
set_geometry: 'varbinary',
|
579
|
+
tinyblob_mediumblob: 'text',
|
580
|
+
tinyblob_longblob: 'longtext',
|
581
|
+
tinyblob_blob: 'text',
|
582
|
+
tinyblob_tinytext: 'tinytext',
|
583
|
+
tinyblob_mediumtext: 'mediumtext',
|
584
|
+
tinyblob_longtext: 'longtext',
|
585
|
+
tinyblob_text: 'text',
|
586
|
+
tinyblob_varbinary: 'text',
|
587
|
+
tinyblob_binary: 'text',
|
588
|
+
tinyblob_char: 'text',
|
589
|
+
tinyblob_geometry: 'longtext',
|
590
|
+
mediumblob_longblob: 'longtext',
|
591
|
+
mediumblob_blob: 'text',
|
592
|
+
mediumblob_tinytext: 'text',
|
593
|
+
mediumblob_mediumtext: 'mediumtext',
|
594
|
+
mediumblob_longtext: 'longtext',
|
595
|
+
mediumblob_text: 'text',
|
596
|
+
mediumblob_varbinary: 'text',
|
597
|
+
mediumblob_binary: 'text',
|
598
|
+
mediumblob_char: 'text',
|
599
|
+
mediumblob_geometry: 'longtext',
|
600
|
+
longblob_blob: 'longtext',
|
601
|
+
longblob_tinytext: 'longtext',
|
602
|
+
longblob_mediumtext: 'longtext',
|
603
|
+
longblob_longtext: 'longtext',
|
604
|
+
longblob_text: 'longtext',
|
605
|
+
longblob_varbinary: 'longtext',
|
606
|
+
longblob_binary: 'longtext',
|
607
|
+
longblob_char: 'longtext',
|
608
|
+
longblob_geometry: 'longtext',
|
609
|
+
blob_tinytext: 'text',
|
610
|
+
blob_mediumtext: 'mediumtext',
|
611
|
+
blob_longtext: 'longtext',
|
612
|
+
blob_text: 'text',
|
613
|
+
blob_varbinary: 'text',
|
614
|
+
blob_binary: 'text',
|
615
|
+
blob_char: 'text',
|
616
|
+
blob_geometry: 'longtext',
|
617
|
+
tinytext_mediumtext: 'text',
|
618
|
+
tinytext_longtext: 'longtext',
|
619
|
+
tinytext_text: 'text',
|
620
|
+
tinytext_varbinary: 'tinytext',
|
621
|
+
tinytext_binary: 'tinytext',
|
622
|
+
tinytext_char: 'text',
|
623
|
+
tinytext_geometry: 'longtext',
|
624
|
+
mediumtext_longtext: 'longtext',
|
625
|
+
mediumtext_text: 'text',
|
626
|
+
mediumtext_varbinary: 'mediumtext',
|
627
|
+
mediumtext_binary: 'mediumtext',
|
628
|
+
mediumtext_char: 'text',
|
629
|
+
mediumtext_geometry: 'longtext',
|
630
|
+
longtext_text: 'longtext',
|
631
|
+
longtext_varbinary: 'longtext',
|
632
|
+
longtext_binary: 'longtext',
|
633
|
+
longtext_char: 'longtext',
|
634
|
+
longtext_geometry: 'longtext',
|
635
|
+
text_varbinary: 'text',
|
636
|
+
text_binary: 'text',
|
637
|
+
text_char: 'text',
|
638
|
+
text_geometry: 'longtext',
|
639
|
+
varbinary_binary: 'varbinary',
|
640
|
+
varbinary_char: 'varbinary',
|
641
|
+
varbinary_geometry: 'varbinary',
|
642
|
+
binary_char: 'binary',
|
643
|
+
binary_geometry: 'varbinary',
|
644
|
+
char_geometry: 'varbinary'
|
648
645
|
};
|
649
|
-
if (type1
|
646
|
+
if (type1 === type2)
|
650
647
|
return type1;
|
651
648
|
//ex. tinyint_smallint or smallint_tinyint
|
652
649
|
//@ts-ignore
|
653
|
-
|
650
|
+
const type1_type2 = typeMapping[`${type1}_${type2}`];
|
651
|
+
//@ts-ignore
|
652
|
+
const type2_type1 = typeMapping[`${type2}_${type1}`];
|
653
|
+
if (type1_type2 === type1 || type2_type1 === type1) {
|
654
654
|
return type1;
|
655
655
|
}
|
656
|
-
|
657
|
-
if (typeMapping[type1 + "_" + type2] == type2 || typeMapping[type2 + "_" + type1] == type2) {
|
656
|
+
if (type1_type2 === type2 || type2_type1 === type2) {
|
658
657
|
return type2;
|
659
658
|
}
|
660
|
-
throw Error(
|
659
|
+
throw Error(`unionTypeResult:${type1}_${type2}`);
|
661
660
|
}
|
662
|
-
exports.unionTypeResult = unionTypeResult;
|
663
661
|
//# sourceMappingURL=unify.js.map
|