gg-mysql-connector 1.0.111 → 1.0.112
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/app_model_const.ts
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
export const app_model_const = {
|
|
2
|
+
item: {
|
|
3
|
+
id: "number",
|
|
4
|
+
name: ["pen", "ruler", "tiger"] as const,
|
|
5
|
+
price: "number",
|
|
6
|
+
description: "string",
|
|
7
|
+
amount: "number",
|
|
8
|
+
userId: "number",
|
|
9
|
+
},
|
|
10
|
+
item__stock: {
|
|
11
|
+
id: "number",
|
|
12
|
+
userId: "number",
|
|
13
|
+
itemId: "number",
|
|
14
|
+
amount: "number",
|
|
15
|
+
},
|
|
16
|
+
user: {
|
|
17
|
+
id: "number",
|
|
18
|
+
name: "string",
|
|
19
|
+
},
|
|
20
|
+
item__each_user: {
|
|
21
|
+
id: "number",
|
|
22
|
+
itemId: "number",
|
|
23
|
+
userId: "number",
|
|
24
|
+
},
|
|
25
|
+
test_view: {
|
|
26
|
+
id: "number",
|
|
27
|
+
name: "string",
|
|
28
|
+
itemName: ["pen", "ruler", "tiger"] as const,
|
|
29
|
+
},
|
|
30
|
+
item_view: {
|
|
31
|
+
id: "number",
|
|
32
|
+
name: ["pen", "ruler", "tiger"] as const,
|
|
33
|
+
amount: "number",
|
|
34
|
+
price: "number",
|
|
35
|
+
},
|
|
36
|
+
} as const
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const app_model_const: {
|
|
2
2
|
readonly item: {
|
|
3
3
|
readonly id: "number";
|
|
4
|
-
readonly name:
|
|
4
|
+
readonly name: readonly ["pen", "ruler", "tiger"];
|
|
5
5
|
readonly price: "number";
|
|
6
6
|
readonly description: "string";
|
|
7
7
|
readonly amount: "number";
|
|
@@ -25,11 +25,11 @@ export declare const app_model_const: {
|
|
|
25
25
|
readonly test_view: {
|
|
26
26
|
readonly id: "number";
|
|
27
27
|
readonly name: "string";
|
|
28
|
-
readonly itemName:
|
|
28
|
+
readonly itemName: readonly ["pen", "ruler", "tiger"];
|
|
29
29
|
};
|
|
30
30
|
readonly item_view: {
|
|
31
31
|
readonly id: "number";
|
|
32
|
-
readonly name:
|
|
32
|
+
readonly name: readonly ["pen", "ruler", "tiger"];
|
|
33
33
|
readonly amount: "number";
|
|
34
34
|
readonly price: "number";
|
|
35
35
|
};
|
package/dist/app_model_const.js
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.app_model_const = void 0;
|
|
4
|
-
exports.app_model_const = {
|
|
4
|
+
exports.app_model_const = {
|
|
5
|
+
item: {
|
|
5
6
|
id: "number",
|
|
6
7
|
name: ["pen", "ruler", "tiger"],
|
|
7
8
|
price: "number",
|
|
8
9
|
description: "string",
|
|
9
10
|
amount: "number",
|
|
10
11
|
userId: "number",
|
|
11
|
-
},
|
|
12
|
+
},
|
|
13
|
+
item__stock: {
|
|
12
14
|
id: "number",
|
|
13
15
|
userId: "number",
|
|
14
16
|
itemId: "number",
|
|
15
17
|
amount: "number",
|
|
16
|
-
},
|
|
18
|
+
},
|
|
19
|
+
user: {
|
|
17
20
|
id: "number",
|
|
18
21
|
name: "string",
|
|
19
|
-
},
|
|
22
|
+
},
|
|
23
|
+
item__each_user: {
|
|
20
24
|
id: "number",
|
|
21
25
|
itemId: "number",
|
|
22
26
|
userId: "number",
|
|
23
|
-
},
|
|
27
|
+
},
|
|
28
|
+
test_view: {
|
|
24
29
|
id: "number",
|
|
25
30
|
name: "string",
|
|
26
31
|
itemName: ["pen", "ruler", "tiger"],
|
|
27
|
-
},
|
|
32
|
+
},
|
|
33
|
+
item_view: {
|
|
28
34
|
id: "number",
|
|
29
35
|
name: ["pen", "ruler", "tiger"],
|
|
30
36
|
amount: "number",
|
|
31
37
|
price: "number",
|
|
32
|
-
}
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -264,6 +264,12 @@ class ModelGenerator {
|
|
|
264
264
|
if (columnChecker || tableName.search("_view") >= 0) {
|
|
265
265
|
const possibleValue = this.getPossibleColumnValue(params.model, cRow.TABLE_NAME, cRow.COLUMN_NAME, cRow.COLUMN_TYPE);
|
|
266
266
|
if (possibleValue) {
|
|
267
|
+
// value = `${value} \n ${cRow.COLUMN_NAME}: [${possibleValue
|
|
268
|
+
// .map((row) => {
|
|
269
|
+
// if (typeof row === "string") return `"${row}"`
|
|
270
|
+
// else if (typeof row === "number") return `${row}`
|
|
271
|
+
// })
|
|
272
|
+
// .join(" , ")}] as ${typeof possibleValue[0]}[],`
|
|
267
273
|
value = `${value} \n ${cRow.COLUMN_NAME}: [${possibleValue
|
|
268
274
|
.map((row) => {
|
|
269
275
|
if (typeof row === "string")
|
|
@@ -271,7 +277,7 @@ class ModelGenerator {
|
|
|
271
277
|
else if (typeof row === "number")
|
|
272
278
|
return `${row}`;
|
|
273
279
|
})
|
|
274
|
-
.join(" , ")}]
|
|
280
|
+
.join(" , ")}] as const,`;
|
|
275
281
|
}
|
|
276
282
|
else {
|
|
277
283
|
value = `${value} \n ${cRow.COLUMN_NAME}: "${(0, convertDataType_1.convertDataType)(cRow.DATA_TYPE)}",`;
|
package/package.json
CHANGED
|
@@ -356,12 +356,18 @@ export default class ModelGenerator {
|
|
|
356
356
|
cRow.COLUMN_TYPE
|
|
357
357
|
)
|
|
358
358
|
if (possibleValue) {
|
|
359
|
+
// value = `${value} \n ${cRow.COLUMN_NAME}: [${possibleValue
|
|
360
|
+
// .map((row) => {
|
|
361
|
+
// if (typeof row === "string") return `"${row}"`
|
|
362
|
+
// else if (typeof row === "number") return `${row}`
|
|
363
|
+
// })
|
|
364
|
+
// .join(" , ")}] as ${typeof possibleValue[0]}[],`
|
|
359
365
|
value = `${value} \n ${cRow.COLUMN_NAME}: [${possibleValue
|
|
360
366
|
.map((row) => {
|
|
361
367
|
if (typeof row === "string") return `"${row}"`
|
|
362
368
|
else if (typeof row === "number") return `${row}`
|
|
363
369
|
})
|
|
364
|
-
.join(" , ")}]
|
|
370
|
+
.join(" , ")}] as const,`
|
|
365
371
|
} else {
|
|
366
372
|
value = `${value} \n ${cRow.COLUMN_NAME}: "${convertDataType(
|
|
367
373
|
cRow.DATA_TYPE
|