@xuda.io/xuda-dbs-plugin-xuda 1.0.307 → 1.0.309
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/server.js +14 -14
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.309",
|
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/server.js
CHANGED
@@ -286,20 +286,20 @@ const get_opt = function (e, table_obj) {
|
|
286
286
|
opt.fields[key] = "udfData.data." + val;
|
287
287
|
}
|
288
288
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
//
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
289
|
+
const _sort_model =
|
290
|
+
typeof e.sortModel === "string" ? JSON.parse(e.sortModel) : e.sortModel;
|
291
|
+
|
292
|
+
// if (!e?.sortModel || !JSON.parse(e.sortModel).length) {
|
293
|
+
if (!e?.sortModel || !_sort_model.length) {
|
294
|
+
// added 2021 09 10
|
295
|
+
if (opt.sort) {
|
296
|
+
for (const [key, val] of Object.entries(opt.sort)) {
|
297
|
+
opt.sort[key] = {
|
298
|
+
["udfData.data." + val]: e.sortOrder === "des" ? "desc" : "asc",
|
299
|
+
};
|
300
|
+
}
|
301
|
+
}
|
302
|
+
}
|
303
303
|
|
304
304
|
var selector_new = {};
|
305
305
|
|