fix(data): align table preview ordering

This commit is contained in:
t8y2 committed 2026-06-23 10:51:30 +08:00
1 parent 752a695018
commit 2f2fc36b18
6 files changed
+160 -117

No files matched your search

@@ -34,7 +34,6 @@ export function useDataGridActions(activeTab: ComputedRef<QueryTab | undefined>)
if (tab.tableMeta && primaryKeys.join("\0") !== tab.tableMeta.primaryKeys.join("\0")) {
tab.tableMeta.primaryKeys = primaryKeys;
}
const fallbackOrderColumns = effectiveDbType === "sqlserver" && !primaryKeys.length ? tableMeta?.columns.slice(0, 1).map((column) => column.name) : undefined;
const useRowId = usesSyntheticRowIdKey(effectiveDbType, primaryKeys);
return buildTableSelectSql({
databaseType: effectiveDbType,
@@ -42,7 +41,6 @@ export function useDataGridActions(activeTab: ComputedRef<QueryTab | undefined>)
tableName: tableMeta?.tableName ?? "",
columns: tableMeta?.columns.map((column) => column.name),
primaryKeys,
fallbackOrderColumns,
includeRowId: useRowId,
limit: options.limit ?? settingsStore.editorSettings.pageSize,
...options,