mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 17:53:59 +00:00
explicit order criteria only on MSSQL #436
This commit is contained in:
@@ -519,13 +519,15 @@ export abstract class GridDisplay {
|
|||||||
alias: 'basetbl',
|
alias: 'basetbl',
|
||||||
},
|
},
|
||||||
columns: columns.map(col => this.createColumnExpression(col, { alias: 'basetbl' })),
|
columns: columns.map(col => this.createColumnExpression(col, { alias: 'basetbl' })),
|
||||||
orderBy: [
|
orderBy: this.driver?.requiresDefaultSortCriteria
|
||||||
{
|
? [
|
||||||
exprType: 'column',
|
{
|
||||||
columnName: orderColumnName,
|
exprType: 'column',
|
||||||
direction: 'ASC',
|
columnName: orderColumnName,
|
||||||
},
|
direction: 'ASC',
|
||||||
],
|
},
|
||||||
|
]
|
||||||
|
: null,
|
||||||
};
|
};
|
||||||
const displayedColumnInfo = _.keyBy(
|
const displayedColumnInfo = _.keyBy(
|
||||||
this.columns.map(col => ({ ...col, sourceAlias: 'basetbl' })),
|
this.columns.map(col => ({ ...col, sourceAlias: 'basetbl' })),
|
||||||
|
|||||||
1
packages/types/engines.d.ts
vendored
1
packages/types/engines.d.ts
vendored
@@ -78,6 +78,7 @@ export interface EngineDriver {
|
|||||||
supportsDatabaseDump?: boolean;
|
supportsDatabaseDump?: boolean;
|
||||||
supportsServerSummary?: boolean;
|
supportsServerSummary?: boolean;
|
||||||
supportsDatabaseProfiler?: boolean;
|
supportsDatabaseProfiler?: boolean;
|
||||||
|
requiresDefaultSortCriteria?: boolean;
|
||||||
profilerFormatterFunction?: string;
|
profilerFormatterFunction?: string;
|
||||||
profilerTimestampFunction?: string;
|
profilerTimestampFunction?: string;
|
||||||
profilerChartAggregateFunction?: string;
|
profilerChartAggregateFunction?: string;
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ const driver = {
|
|||||||
dumperClass: MsSqlDumper,
|
dumperClass: MsSqlDumper,
|
||||||
dialect,
|
dialect,
|
||||||
readOnlySessions: false,
|
readOnlySessions: false,
|
||||||
|
requiresDefaultSortCriteria: true,
|
||||||
dialectByVersion(version) {
|
dialectByVersion(version) {
|
||||||
if (version && version.productVersionNumber < 11) {
|
if (version && version.productVersionNumber < 11) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user