mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 00:16:00 +00:00
export query
This commit is contained in:
@@ -381,13 +381,13 @@ export abstract class GridDisplay {
|
||||
};
|
||||
}
|
||||
|
||||
createSelect(): Select {
|
||||
createSelect(options = {}): Select {
|
||||
return null;
|
||||
}
|
||||
|
||||
processReferences(select: Select, displayedColumnInfo: DisplayedColumnInfo) {}
|
||||
processReferences(select: Select, displayedColumnInfo: DisplayedColumnInfo, options) {}
|
||||
|
||||
createSelectBase(name: NamedObjectInfo, columns: ColumnInfo[]) {
|
||||
createSelectBase(name: NamedObjectInfo, columns: ColumnInfo[], options) {
|
||||
if (!columns) return null;
|
||||
const orderColumnName = columns[0].columnName;
|
||||
const select: Select = {
|
||||
@@ -411,7 +411,7 @@ export abstract class GridDisplay {
|
||||
this.columns.map((col) => ({ ...col, sourceAlias: 'basetbl' })),
|
||||
'uniqueName'
|
||||
);
|
||||
this.processReferences(select, displayedColumnInfo);
|
||||
this.processReferences(select, displayedColumnInfo, options);
|
||||
this.applyFilterOnSelect(select, displayedColumnInfo);
|
||||
this.applyGroupOnSelect(select, displayedColumnInfo);
|
||||
this.applySortOnSelect(select, displayedColumnInfo);
|
||||
@@ -427,6 +427,13 @@ export abstract class GridDisplay {
|
||||
return sql;
|
||||
}
|
||||
|
||||
getExportQuery() {
|
||||
const select = this.createSelect({ isExport: true });
|
||||
if (!select) return null;
|
||||
const sql = treeToSql(this.driver, select, dumpSqlSelect);
|
||||
return sql;
|
||||
}
|
||||
|
||||
resizeColumn(uniqueName: string, computedSize: number, diff: number) {
|
||||
this.setConfig((cfg) => {
|
||||
const columnWidths = {
|
||||
|
||||
Reference in New Issue
Block a user