@xuda.io/xuda-dbs-plugin-xuda 1.0.152 → 1.0.153

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/studio.mjs +2 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.152",
3
+ "version": "1.0.153",
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
@@ -1,22 +1,8 @@
1
1
  const check_unique = async function (e, docP, table_obj, db) {
2
2
  const validate_unique_index_exist = function () {
3
3
  let unique_exist = false;
4
- for (var val of docP.udfIndex) {
5
- if (!table_obj.tableIndexes) {
6
- break;
7
- }
8
-
9
- const table_index = find_item_by_key_root(
10
- table_obj.tableIndexes,
11
- "id",
12
- val.indexId
13
- );
14
-
15
- if (!table_index) {
16
- break;
17
- }
18
-
19
- if (table_index.data.unique) {
4
+ for (var val of table_obj.tableIndexes) {
5
+ if (val.data.unique) {
20
6
  unique_exist = true;
21
7
  break;
22
8
  }