baja-lite 1.1.5 → 1.1.8
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/code.js +5 -2
- package/object.js +0 -1
- package/package.json +2 -1
- package/sql.js +2 -2
package/code.js
CHANGED
|
@@ -47,7 +47,7 @@ const lxMap = {
|
|
|
47
47
|
geometrycollection: "Object"
|
|
48
48
|
};
|
|
49
49
|
let force = false;
|
|
50
|
-
const basepath = path.join(__dirname, '..', '..'
|
|
50
|
+
const basepath = path.join(__dirname, '..', '..');
|
|
51
51
|
const config = path.join(basepath, 'baja.code.json');
|
|
52
52
|
const templatePath = path.join(basepath, 'code-template');
|
|
53
53
|
console.log(`
|
|
@@ -109,7 +109,8 @@ console.log(`
|
|
|
109
109
|
], Field(类型string),表示字段的注解, Type 表示JS类型
|
|
110
110
|
columnNames_join: 'sku_id, sku_name'
|
|
111
111
|
ColumnNames_join: 'sku_id skuId, sku_name skuName'
|
|
112
|
-
|
|
112
|
+
columnNames_joinT: 't.sku_id, t.sku_name'
|
|
113
|
+
ColumnNames_joinT: 't.sku_id skuId, t.sku_name skuName'
|
|
113
114
|
columns_no_id: [], 同columns,没有ID而已
|
|
114
115
|
columnNames_no_id: [],
|
|
115
116
|
|
|
@@ -253,6 +254,8 @@ try {
|
|
|
253
254
|
ColumnNames: columns?.map(i => i.Name),
|
|
254
255
|
columnNames_join: columns?.map(i => i.name).join(','),
|
|
255
256
|
ColumnNames_join: columns?.map(i => `${i.name} ${i.Name}`).join(','),
|
|
257
|
+
columnNames_joinT: columns?.map(i => `t.${i.name}`).join(','),
|
|
258
|
+
ColumnNames_joinT: columns?.map(i => `t.${i.name} ${i.Name}`).join(','),
|
|
256
259
|
columns_no_id: columns?.filter(i => !i.id),
|
|
257
260
|
columnNames_no_id: columns?.filter(i => !i.id).map(i => i.name),
|
|
258
261
|
ColumnNames_no_id: columns?.filter(i => !i.id).map(i => i.Name),
|
package/object.js
CHANGED
|
@@ -8,7 +8,6 @@ import iterate from "iterare";
|
|
|
8
8
|
*/
|
|
9
9
|
export const copyBean = (source, classType) => {
|
|
10
10
|
const result = {};
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
12
11
|
Object.keys(classType).forEach((key) => {
|
|
13
12
|
result[key] =
|
|
14
13
|
source[key] !== undefined ? source[key] : (result[key] = null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baja-lite",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "some util for self",
|
|
5
5
|
"homepage": "https://github.com/void-soul/util-man",
|
|
6
6
|
"repository": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"pino": "9.6.0",
|
|
46
46
|
"pino-pretty": "13.0.0",
|
|
47
47
|
"reflect-metadata": "0.2.2",
|
|
48
|
+
"request": "2.88.2",
|
|
48
49
|
"request-promise": "4.2.6",
|
|
49
50
|
"sql-formatter": "15.4.10",
|
|
50
51
|
"sqlstring": "2.3.3",
|
package/sql.js
CHANGED
|
@@ -2725,7 +2725,7 @@ export class SqlService {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
return result;
|
|
2727
2727
|
}, { everyLength: option?.maxDeal });
|
|
2728
|
-
return result.reduce((a, b) => a + b);
|
|
2728
|
+
return result.length > 0 ? result.reduce((a, b) => a + b) : 0;
|
|
2729
2729
|
};
|
|
2730
2730
|
if (option.dbType === DBType.SqliteRemote || option?.conn?.[_inTransaction] === true) {
|
|
2731
2731
|
return fn();
|
|
@@ -2747,7 +2747,7 @@ export class SqlService {
|
|
|
2747
2747
|
}
|
|
2748
2748
|
return result;
|
|
2749
2749
|
}, { everyLength: option?.maxDeal });
|
|
2750
|
-
return result.reduce((a, b) => a + b);
|
|
2750
|
+
return result.length > 0 ? result.reduce((a, b) => a + b) : 0;
|
|
2751
2751
|
};
|
|
2752
2752
|
if (option.dbType === DBType.SqliteRemote || option?.conn?.[_inTransaction] === true) {
|
|
2753
2753
|
return fn();
|