@xuda.io/xuda-dbs-plugin-xuda 1.0.106 → 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 = [];
|
@@ -1180,7 +1180,7 @@ export const create_design = async (params, resolve, reject) => {
|
|
1180
1180
|
|
1181
1181
|
db_table_counts: {
|
1182
1182
|
map: 'function(doc) {\r\n\r\nif (doc.docType=="database" && doc.stat===3) {\r\n if(doc.udfData && doc.udfData.udffileid) \r\n emit(doc.udfData.udffileid, 1); \r\n }\r\n}',
|
1183
|
-
reduce: "
|
1183
|
+
reduce: "_count",
|
1184
1184
|
},
|
1185
1185
|
stat_3_doc_counts: {
|
1186
1186
|
reduce: "_count",
|
@@ -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
|
};
|