fix(sql-file): preserve Oracle schema during file execution
Closes #10502
This commit is contained in:
20 files changed
+269
-41
No files matched your search
@@ -215,6 +215,7 @@ describe("namespace options", () => {
|
||||
it("identifies connection-root namespace options as schemas", () => {
|
||||
expect(namespaceOptionsAreSchemas({ db_type: "dameng" })).toBe(true);
|
||||
expect(namespaceOptionsAreSchemas({ db_type: "oracle" })).toBe(true);
|
||||
expect(namespaceOptionsAreSchemas({ db_type: "oceanbase-oracle" })).toBe(true);
|
||||
expect(
|
||||
namespaceOptionsAreSchemas({
|
||||
db_type: "jdbc",
|
||||
|
||||
@@ -64,6 +64,7 @@ const dataComparePrefillTable = ref("");
|
||||
const dataCompareSessionId = ref<string | null>(null);
|
||||
const sqlFilePrefillConnectionId = ref("");
|
||||
const sqlFilePrefillDatabase = ref("");
|
||||
const sqlFilePrefillSchema = ref<string>();
|
||||
const sqlFilePrefillFilePath = ref("");
|
||||
const sqlFilePrefillPreview = ref<SqlFilePreview>();
|
||||
const diagramPrefillConnectionId = ref("");
|
||||
@@ -221,6 +222,7 @@ export function useDialogSources() {
|
||||
if (v) {
|
||||
sqlFilePrefillConnectionId.value = v.connectionId;
|
||||
sqlFilePrefillDatabase.value = v.database;
|
||||
sqlFilePrefillSchema.value = v.schema;
|
||||
sqlFilePrefillFilePath.value = v.filePath ?? "";
|
||||
sqlFilePrefillPreview.value = v.preview;
|
||||
showSqlFileDialog.value = true;
|
||||
@@ -236,6 +238,7 @@ export function useDialogSources() {
|
||||
if (!open) {
|
||||
sqlFilePrefillConnectionId.value = "";
|
||||
sqlFilePrefillDatabase.value = "";
|
||||
sqlFilePrefillSchema.value = undefined;
|
||||
sqlFilePrefillFilePath.value = "";
|
||||
sqlFilePrefillPreview.value = undefined;
|
||||
}
|
||||
@@ -629,6 +632,7 @@ export function useDialogSources() {
|
||||
dataCompareSessionId,
|
||||
sqlFilePrefillConnectionId,
|
||||
sqlFilePrefillDatabase,
|
||||
sqlFilePrefillSchema,
|
||||
sqlFilePrefillFilePath,
|
||||
sqlFilePrefillPreview,
|
||||
diagramPrefillConnectionId,
|
||||
|
||||
@@ -21,6 +21,7 @@ export function useLargeSqlFileStreamingFallback() {
|
||||
connectionStore.sqlFileSource = {
|
||||
connectionId: target.connectionId,
|
||||
database: target.database,
|
||||
...(target.schema ? { schema: target.schema } : {}),
|
||||
filePath: path,
|
||||
};
|
||||
toast(t("sqlFile.largeFileExecutionOpened", { size: formatSqlFileSize(sizeBytes) }), 6000);
|
||||
|
||||
@@ -62,6 +62,7 @@ export function useSidebarTreeToolRuntime(options: SidebarTreeToolRuntimeOptions
|
||||
connectionStore.sqlFileSource = {
|
||||
connectionId: activeNode.value.connectionId,
|
||||
database: activeNode.value.database ?? "",
|
||||
...(activeNode.value.schema ? { schema: activeNode.value.schema } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user