mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix loop for cancelling out databases (#19460)
* fix loop for cancelling out databases * remove loop and comments
This commit is contained in:
@@ -323,7 +323,6 @@ export async function promptForObjectName(bindingType: BindingType, connectionIn
|
|||||||
let connectionURI: string | undefined;
|
let connectionURI: string | undefined;
|
||||||
let selectedDatabase: string | undefined;
|
let selectedDatabase: string | undefined;
|
||||||
|
|
||||||
while (true) {
|
|
||||||
if (!connectionInfo) {
|
if (!connectionInfo) {
|
||||||
// prompt is shown when user selects an existing connection string setting
|
// prompt is shown when user selects an existing connection string setting
|
||||||
// or manually enters a connection string
|
// or manually enters a connection string
|
||||||
@@ -335,15 +334,13 @@ export async function promptForObjectName(bindingType: BindingType, connectionIn
|
|||||||
// get connectionURI and selectedDatabase to be used for listing tables query request
|
// get connectionURI and selectedDatabase to be used for listing tables query request
|
||||||
connectionURI = await getConnectionURI(connectionInfo);
|
connectionURI = await getConnectionURI(connectionInfo);
|
||||||
if (!connectionURI) {
|
if (!connectionURI) {
|
||||||
// User cancelled or mssql connection error
|
// mssql connection error
|
||||||
// we will then prompt user to choose a connection profile again
|
return undefined;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
selectedDatabase = await promptSelectDatabase(connectionURI);
|
selectedDatabase = await promptSelectDatabase(connectionURI);
|
||||||
if (!selectedDatabase) {
|
if (!selectedDatabase) {
|
||||||
// User cancelled
|
// User cancelled
|
||||||
// we will then prompt user to choose a connection profile again
|
return undefined;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connectionInfo.database = selectedDatabase;
|
connectionInfo.database = selectedDatabase;
|
||||||
@@ -352,7 +349,6 @@ export async function promptForObjectName(bindingType: BindingType, connectionIn
|
|||||||
|
|
||||||
return selectedObjectName;
|
return selectedObjectName;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompts the user to enter connection setting and updates it from AF project
|
* Prompts the user to enter connection setting and updates it from AF project
|
||||||
|
|||||||
Reference in New Issue
Block a user