oak-db 2.2.3 → 2.2.5
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/lib/MySQL/translator.js +3 -2
- package/lib/sqlTranslator.js +2 -2
- package/package.json +3 -3
package/lib/MySQL/translator.js
CHANGED
|
@@ -301,10 +301,11 @@ var MySqlTranslator = /** @class */ (function (_super) {
|
|
|
301
301
|
indexes.forEach(function (_a, idx) {
|
|
302
302
|
var name = _a.name, attributes = _a.attributes, config = _a.config;
|
|
303
303
|
var _b = config || {}, unique = _b.unique, type = _b.type, parser = _b.parser;
|
|
304
|
-
|
|
304
|
+
// 因为有deleteAt的存在,这里的unique没意义,只能框架自己去建立checker来处理
|
|
305
|
+
/* if (unique) {
|
|
305
306
|
sql += ' unique ';
|
|
306
307
|
}
|
|
307
|
-
else if (type === 'fulltext') {
|
|
308
|
+
else */ if (type === 'fulltext') {
|
|
308
309
|
sql += ' fulltext ';
|
|
309
310
|
}
|
|
310
311
|
else if (type === 'spatial') {
|
package/lib/sqlTranslator.js
CHANGED
|
@@ -104,7 +104,7 @@ var SqlTranslator = /** @class */ (function () {
|
|
|
104
104
|
if (attr.endsWith('State') && attributes[attr].type === 'varchar') {
|
|
105
105
|
if (!(indexes === null || indexes === void 0 ? void 0 : indexes.find(function (ele) { return ele.attributes[0].name === attr; }))) {
|
|
106
106
|
intrinsticIndexes.push({
|
|
107
|
-
name: "".concat(entity, "
|
|
107
|
+
name: "".concat(entity, "_").concat(attr, "_auto_create"),
|
|
108
108
|
attributes: [{
|
|
109
109
|
name: attr,
|
|
110
110
|
}, {
|
|
@@ -866,7 +866,7 @@ var SqlTranslator = /** @class */ (function () {
|
|
|
866
866
|
if (updateText) {
|
|
867
867
|
updateText += ',';
|
|
868
868
|
}
|
|
869
|
-
(0, assert_1.default)(attributes.hasOwnProperty(attr)
|
|
869
|
+
(0, assert_1.default)(attributes.hasOwnProperty(attr));
|
|
870
870
|
var value = this.translateAttrValue(attributes[attr].type, data[attr]);
|
|
871
871
|
updateText += "`".concat(alias, "`.`").concat(attr, "` = ").concat(value);
|
|
872
872
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oak-db",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "oak-db",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"author": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
19
|
"mysql": "^2.18.1",
|
|
20
20
|
"mysql2": "^2.3.3",
|
|
21
|
-
"oak-domain": "^2.4.
|
|
21
|
+
"oak-domain": "^2.4.3",
|
|
22
22
|
"uuid": "^8.3.2"
|
|
23
23
|
},
|
|
24
24
|
"license": "ISC",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/node": "^17.0.42",
|
|
30
30
|
"@types/uuid": "^8.3.4",
|
|
31
31
|
"mocha": "^10.0.0",
|
|
32
|
-
"oak-general-business": "^2.3.
|
|
32
|
+
"oak-general-business": "^2.3.4",
|
|
33
33
|
"ts-node": "~10.9.1",
|
|
34
34
|
"tslib": "^2.4.0",
|
|
35
35
|
"typescript": "~4.7.4"
|