feat(saved-sql): run queries in the current database
This commit is contained in:
1 parent
4062f11a26
commit
e2ba75b102
22 files changed
+501
-51
No files matched your search
@@ -1083,8 +1083,8 @@ async function openSavedSqlFile() {
|
||||
if (node.type !== "saved-sql-file" || !node.savedSqlId) return;
|
||||
const file = await savedSqlStore.ensureFileContent(node.savedSqlId);
|
||||
if (!file) return;
|
||||
queryStore.openSavedSql(file);
|
||||
connectionStore.activeConnectionId = file.connectionId;
|
||||
const tabId = queryStore.openSavedSql(file);
|
||||
connectionStore.activeConnectionId = queryStore.tabs.find((tab) => tab.id === tabId)?.connectionId ?? file.connectionId;
|
||||
void savedSqlStore.recordFileUsage(file.id);
|
||||
}
|
||||
|
||||
@@ -3744,8 +3744,8 @@ function savedSqlHistoryScopeForNode(node: TreeNode): SavedSqlHistoryScope | nul
|
||||
async function openSavedSqlHistoryFile(fileId: string) {
|
||||
const file = await savedSqlStore.ensureFileContent(fileId);
|
||||
if (!file) return;
|
||||
queryStore.openSavedSql(file);
|
||||
connectionStore.activeConnectionId = file.connectionId;
|
||||
const tabId = queryStore.openSavedSql(file);
|
||||
connectionStore.activeConnectionId = queryStore.tabs.find((tab) => tab.id === tabId)?.connectionId ?? file.connectionId;
|
||||
void savedSqlStore.recordFileUsage(file.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user