fix(frontend): fix quick-open source type
This commit is contained in:
1 parent
4d55dd0795
commit
b04d4aa78c
4 files changed
+476
-478
No files matched your search
@@ -40,7 +40,7 @@ import { uuid } from "@/lib/utils";
|
||||
import { isTauriRuntime } from "@/lib/tauriRuntime";
|
||||
import { openQueryResultArchiveFile } from "@/lib/queryResultArchiveFile";
|
||||
import { sqlFileTitleFromPath } from "@/lib/sqlFileOpen";
|
||||
import type { ConnectionConfig, QueryTab } from "@/types/database";
|
||||
import type { ConnectionConfig, ObjectSourceKind, QueryTab } from "@/types/database";
|
||||
import { parseConnectionDeepLink, type ConnectionDeepLinkDraft } from "@/lib/connectionDeepLink";
|
||||
import {
|
||||
isBrowserReloadShortcut,
|
||||
@@ -1023,7 +1023,7 @@ async function handleQuickOpenSelect(item: any) {
|
||||
});
|
||||
} else if (item.type === "procedure" || item.type === "function" || item.type === "sequence" || item.type === "package" || item.type === "package-body") {
|
||||
// Open the object source in a source tab
|
||||
const objectTypeMap: Record<string, string> = {
|
||||
const objectTypeMap: Record<string, ObjectSourceKind> = {
|
||||
procedure: "PROCEDURE",
|
||||
function: "FUNCTION",
|
||||
sequence: "SEQUENCE",
|
||||
@@ -1036,7 +1036,7 @@ async function handleQuickOpenSelect(item: any) {
|
||||
|
||||
const schema = item.schema || item.database;
|
||||
try {
|
||||
const result = await api.getObjectSource(item.connectionId, item.database, schema, item.objectName || item.tableName, objectType as any);
|
||||
const result = await api.getObjectSource(item.connectionId, item.database, schema, item.objectName || item.tableName, objectType);
|
||||
const tabId = queryStore.createTab(item.connectionId, item.database, `Source - ${item.objectName || item.tableName}`);
|
||||
queryStore.updateSql(tabId, result.source);
|
||||
if (item.type !== "sequence") {
|
||||
|
||||
Reference in new issue
Block a user