@xuda.io/xuda-dbs-plugin-xuda 1.0.115 → 1.0.117
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/studio.mjs +9 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xuda.io/xuda-dbs-plugin-xuda",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.117",
|
4
4
|
"description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
|
5
5
|
"scripts": {
|
6
6
|
"pub": "npm version patch --force && npm publish --access public"
|
package/studio.mjs
CHANGED
@@ -181,7 +181,11 @@ const get_cast_val = async function (e, source, attributeP, typeP, valP) {
|
|
181
181
|
};
|
182
182
|
|
183
183
|
if (_this.xu_cast) {
|
184
|
-
|
184
|
+
const xu_cast = await func.common.get_module(
|
185
|
+
SESSION_ID,
|
186
|
+
`xuda-get-cast-util-module.mjs`
|
187
|
+
);
|
188
|
+
return xu_cast.cast(typeP, valP, success, fail);
|
185
189
|
}
|
186
190
|
return xu_cast(typeP, valP, success, fail);
|
187
191
|
};
|
@@ -1291,7 +1295,7 @@ export const create = async (params, resolve, reject) => {
|
|
1291
1295
|
if (index_ret < 0) throw index_ret.data;
|
1292
1296
|
doc.udfIndex = index_ret.data;
|
1293
1297
|
|
1294
|
-
const ret = await
|
1298
|
+
const ret = await check_unique(e, doc, table_obj, db);
|
1295
1299
|
if (ret.code < 0) {
|
1296
1300
|
throw ret;
|
1297
1301
|
}
|
@@ -1327,7 +1331,7 @@ export const create = async (params, resolve, reject) => {
|
|
1327
1331
|
return index_ret;
|
1328
1332
|
}
|
1329
1333
|
doc.udfIndex = index_ret.data;
|
1330
|
-
const ret = await
|
1334
|
+
const ret = await check_unique(e, doc, table_obj, db);
|
1331
1335
|
if (ret.code < 0) {
|
1332
1336
|
return reject(ret.data);
|
1333
1337
|
}
|
@@ -1423,7 +1427,7 @@ export const update = async (params, resolve, reject) => {
|
|
1423
1427
|
return index_ret;
|
1424
1428
|
}
|
1425
1429
|
doc.udfIndex = index_ret.data;
|
1426
|
-
const ret = await
|
1430
|
+
const ret = await check_unique(e, doc, table_obj, db);
|
1427
1431
|
if (ret.code < 0) {
|
1428
1432
|
return ret;
|
1429
1433
|
}
|
@@ -1526,6 +1530,7 @@ export const create_design = async (params, resolve, reject) => {
|
|
1526
1530
|
return resolve(err);
|
1527
1531
|
}
|
1528
1532
|
};
|
1533
|
+
|
1529
1534
|
export const init_module = async (params) => {
|
1530
1535
|
_this.xu_cast = params.xu_cast;
|
1531
1536
|
};
|