@xuda.io/xuda-dbs-plugin-xuda 1.0.105 → 1.0.107
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 +4 -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.107",
|
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
@@ -219,7 +219,7 @@ const query_db = async function (e, db, table_obj) {
|
|
219
219
|
});
|
220
220
|
}
|
221
221
|
|
222
|
-
return { code: 1, data: { rows: rows, total_rows: rows.length } };
|
222
|
+
return { code: 1, data: { rows: rows, total_rows: rows.length }, opt };
|
223
223
|
};
|
224
224
|
const count_data = async function () {
|
225
225
|
var rows = [];
|
@@ -1172,7 +1172,7 @@ export const create_design = async (params, resolve, reject) => {
|
|
1172
1172
|
views: {
|
1173
1173
|
db_index_reduce: {
|
1174
1174
|
map: 'function(doc) {\r\n if (doc.docType=="database" && doc.stat===3) {\r\n if (doc.udfIndex) {\r\n for (var i = 0; i < doc.udfIndex.length; i++)\r\n {\r\n var val = doc.udfIndex[i]; \r\n emit([val.fileId, val.indexId, val.keyValue],1);\r\n }\r\n }\r\n }\r\n \r\n}',
|
1175
|
-
reduce: "
|
1175
|
+
reduce: "function(keys, values) {\n return sum(values);\n}",
|
1176
1176
|
},
|
1177
1177
|
db_index: {
|
1178
1178
|
map: 'function(doc) {\r\n if (doc.docType=="database" && doc.stat===3) {\r\n if (doc.udfIndex) {\r\n for (var i = 0; i < doc.udfIndex.length; i++)\r\n {\r\n var val = doc.udfIndex[i]; \r\n emit([val.fileId, val.indexId, val.keyValue],{_id: doc._id});\r\n }\r\n }\r\n }\r\n \r\n}',
|
@@ -1192,7 +1192,7 @@ export const create_design = async (params, resolve, reject) => {
|
|
1192
1192
|
try {
|
1193
1193
|
const ret = await db.put(ddoc, { timeout: 99999999999 });
|
1194
1194
|
resolve(ret);
|
1195
|
-
} catch (
|
1196
|
-
return
|
1195
|
+
} catch (err) {
|
1196
|
+
return resolve(err);
|
1197
1197
|
}
|
1198
1198
|
};
|