@xuda.io/xuda-dbs-plugin-xuda 1.0.167 → 1.0.169
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 +8 -0
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.169",
|
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
@@ -533,6 +533,14 @@ const get_opt = function (e, table_obj) {
|
|
533
533
|
opt.selector["docType"] = "database";
|
534
534
|
opt.selector.stat = e.archived ? 4 : 3;
|
535
535
|
|
536
|
+
// fill selector with sort field if not exist
|
537
|
+
for (let val of opt.sort) {
|
538
|
+
let field_id = Object.keys(val)[0];
|
539
|
+
if (opt.selector[field_id]) {
|
540
|
+
opt.selector[field_id] = { $gt: null };
|
541
|
+
}
|
542
|
+
}
|
543
|
+
|
536
544
|
opt.fields.push("_id");
|
537
545
|
opt.fields.push("_rev");
|
538
546
|
|