mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 17:16:01 +00:00
mongo sorts - moved to plugin
This commit is contained in:
@@ -238,15 +238,16 @@ export class PerspectiveDataLoader {
|
||||
const res: any = {
|
||||
pureName,
|
||||
condition: this.buildSqlCondition(props),
|
||||
sort: useSort ? props.orderBy : undefined,
|
||||
skip: props.range?.offset,
|
||||
limit: props.range?.limit,
|
||||
};
|
||||
if (useSort && props.orderBy?.length > 0) {
|
||||
res.sort = _zipObject(
|
||||
props.orderBy.map(col => col.columnName),
|
||||
props.orderBy.map(col => (col.order == 'DESC' ? -1 : 1))
|
||||
);
|
||||
}
|
||||
// if (useSort && props.orderBy?.length > 0) {
|
||||
// res.sort = _zipObject(
|
||||
// props.orderBy.map(col => col.columnName),
|
||||
// props.orderBy.map(col => (col.order == 'DESC' ? -1 : 1))
|
||||
// );
|
||||
// }
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user