mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 12:35:59 +00:00
load row count
This commit is contained in:
@@ -269,7 +269,7 @@ export abstract class GridDisplay {
|
||||
this.columns.map((col) => ({ ...col, sourceAlias: 'basetbl' })),
|
||||
'uniqueName'
|
||||
);
|
||||
const action = this.processReferences(select, displayedColumnInfo)
|
||||
const action = this.processReferences(select, displayedColumnInfo);
|
||||
this.applyFilterOnSelect(select, displayedColumnInfo);
|
||||
this.applySortOnSelect(select, displayedColumnInfo);
|
||||
if (action == 'loadRequired') {
|
||||
@@ -286,4 +286,18 @@ export abstract class GridDisplay {
|
||||
const sql = treeToSql(this.driver, select, dumpSqlSelect);
|
||||
return sql;
|
||||
}
|
||||
|
||||
getCountQuery() {
|
||||
const select = this.createSelect();
|
||||
select.columns = [
|
||||
{
|
||||
exprType: 'raw',
|
||||
sql: 'COUNT(*)',
|
||||
alias: 'count',
|
||||
},
|
||||
];
|
||||
select.orderBy = null;
|
||||
const sql = treeToSql(this.driver, select, dumpSqlSelect);
|
||||
return sql;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user