@xuda.io/xuda-dbs-plugin-xuda 1.0.60 → 1.0.62
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 +7 -1
package/package.json
CHANGED
package/server.js
CHANGED
@@ -841,12 +841,18 @@ const query_db = async function (e, db, app_id_reference, table_obj) {
|
|
841
841
|
if (e.reduce) {
|
842
842
|
let rows = [];
|
843
843
|
|
844
|
+
const table_index = find_item_by_key_root(
|
845
|
+
table_obj.tableIndexes,
|
846
|
+
"id",
|
847
|
+
e.indexId
|
848
|
+
);
|
849
|
+
|
844
850
|
for await (var val of body.rows) {
|
845
851
|
const arr = val.key[2];
|
846
852
|
|
847
853
|
var obj = {};
|
848
854
|
for await (const [arr_key, arr_val] of Object.entries(arr)) {
|
849
|
-
obj[
|
855
|
+
obj[table_index.data.keys[arr_key]] = arr_val;
|
850
856
|
}
|
851
857
|
obj["REDUCE_VALUE"] = val.value;
|
852
858
|
|