@xuda.io/xuda-dbs-plugin-xuda 1.0.33 → 1.0.34
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/package.json +1 -1
- package/server.js +4 -4
package/package.json
CHANGED
package/server.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
const _ = require("lodash");
|
2
2
|
|
3
|
-
const check_unique = async function (docP, table_obj) {
|
3
|
+
const check_unique = async function (e, docP, table_obj) {
|
4
4
|
var len = docP.udfIndex.length;
|
5
5
|
if (!len) {
|
6
6
|
return { code: -11, data: "table must have primary index" };
|
@@ -215,7 +215,7 @@ exports.create = async (params, setup_doc, resolve, reject) => {
|
|
215
215
|
if (index_ret < 0) throw index_ret.data;
|
216
216
|
doc.udfIndex = index_ret.data;
|
217
217
|
|
218
|
-
const ret = await check_unique(doc, table_obj);
|
218
|
+
const ret = await check_unique(e, doc, table_obj);
|
219
219
|
if (ret.code < 0) {
|
220
220
|
throw ret;
|
221
221
|
}
|
@@ -251,7 +251,7 @@ exports.create = async (params, setup_doc, resolve, reject) => {
|
|
251
251
|
return index_ret;
|
252
252
|
}
|
253
253
|
doc.udfIndex = index_ret.data;
|
254
|
-
const ret = await check_unique(doc, table_obj);
|
254
|
+
const ret = await check_unique(e, doc, table_obj);
|
255
255
|
if (ret.code < 0) {
|
256
256
|
return ret;
|
257
257
|
}
|
@@ -994,7 +994,7 @@ exports.update = async (params, setup_doc, resolve, reject) => {
|
|
994
994
|
return index_ret;
|
995
995
|
}
|
996
996
|
doc.udfIndex = index_ret.data;
|
997
|
-
const ret = await check_unique(doc, table_obj);
|
997
|
+
const ret = await check_unique(e, doc, table_obj);
|
998
998
|
if (ret.code < 0) {
|
999
999
|
return ret;
|
1000
1000
|
}
|