mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 14:16:01 +00:00
mongo sorts - moved to plugin
This commit is contained in:
@@ -171,7 +171,16 @@ function convertToMongoAggregate(collectionAggregate) {
|
||||
];
|
||||
}
|
||||
|
||||
function convertToMongoSort(sort) {
|
||||
if (!sort) return null;
|
||||
return _zipObject(
|
||||
sort.map((col) => col.columnName),
|
||||
sort.map((col) => (col.order == 'DESC' ? -1 : 1))
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
convertToMongoCondition,
|
||||
convertToMongoAggregate,
|
||||
convertToMongoSort,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user