feat(sqlserver): add sql server 2000 legacy support

This commit is contained in:
zipg authored and GitHub committed 2026-09-01 00:33:06 +08:00
1 parent 69a032ed63
commit afe3b3f3c2
20 files changed
+682 -24

No files matched your search

@@ -446,8 +446,13 @@ export function useDataGridActions(activeTab: ComputedRef<QueryTab | undefined>)
tab.whereInput = whereInput ?? "";
const sql = await buildTableSql(tab, { limit, offset, whereInput, orderBy: orderBy ?? tab.orderByInput });
queryStore.updateSql(tab.id, sql);
const expectedNextOffset = appendResult ? tab.result?.rows.length : (tab.resultPageOffset ?? 0) + (tab.resultPageLimit ?? limit);
const continuesResultSession = offset === expectedNextOffset && limit === tab.resultPageLimit;
const connection = useConnectionStore().getConfig(tab.connectionId);
const isSqlServerLegacy = connection?.db_type === "sqlserver" && connection.driver_profile?.trim().toLowerCase() === "sqlserver-legacy";
const sessionId = isSqlServerLegacy && tab.result?.has_more && tab.result.session_id && continuesResultSession ? tab.result.session_id : undefined;
await queryStore.executeTabSql(tab.id, sql, {
pagination: { offset, limit },
pagination: { offset, limit, sessionId, clientSessionId: sessionId ? tab.resultClientSessionId : undefined },
...appendOptions,
preserveResultDuringExecution: true,
preserveTotalRowCountDuringExecution: true,