mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 20:46:00 +00:00
fix nosql ordering
This commit is contained in:
@@ -66,7 +66,7 @@
|
|||||||
if (sort?.length > 0) {
|
if (sort?.length > 0) {
|
||||||
return sort.map(col => ({
|
return sort.map(col => ({
|
||||||
columnName: col.uniqueName,
|
columnName: col.uniqueName,
|
||||||
order: col.order,
|
direction: col.order,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ function convertToMongoSort(sort) {
|
|||||||
if (!sort) return null;
|
if (!sort) return null;
|
||||||
return _zipObject(
|
return _zipObject(
|
||||||
sort.map((col) => col.columnName),
|
sort.map((col) => col.columnName),
|
||||||
sort.map((col) => (col.order == 'DESC' ? -1 : 1))
|
sort.map((col) => (col.direction == 'DESC' ? -1 : 1))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user