mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 17:22:55 -05:00
Add Table Menu for SQL Bindings promptForObjectName (#19358)
* first wip for table menu prompt * fix up some table prompts * use simpleExecuteRequest * fix table prompt scenario for sql binding also * fix/add more testing and address comments * add brackets to selected database * add manually entered option
This commit is contained in:
21
extensions/sql-bindings/src/sql-bindings.d.ts
vendored
21
extensions/sql-bindings/src/sql-bindings.d.ts
vendored
@@ -7,6 +7,7 @@
|
||||
declare module 'sql-bindings' {
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { IConnectionInfo } from 'vscode-mssql';
|
||||
|
||||
export const enum extension {
|
||||
name = 'Microsoft.sql-bindings',
|
||||
@@ -36,14 +37,20 @@ declare module 'sql-bindings' {
|
||||
/**
|
||||
* Prompts the user to enter object name for the SQL query
|
||||
* @param bindingType Type of SQL Binding
|
||||
* @param connectionInfo (optional) connection info from the selected connection profile
|
||||
* if left undefined we prompt to manually enter the object name
|
||||
* @returns the object name from user's input or menu choice
|
||||
*/
|
||||
promptForObjectName(bindingType: BindingType): Promise<string | undefined>;
|
||||
promptForObjectName(bindingType: BindingType, connectionInfo?: IConnectionInfo): Promise<string | undefined>;
|
||||
|
||||
/**
|
||||
* Prompts the user to enter connection setting and updates it from AF project
|
||||
* @param projectUri Azure Function project uri
|
||||
*/
|
||||
promptAndUpdateConnectionStringSetting(projectUri: vscode.Uri | undefined): Promise<string | undefined>;
|
||||
* @param connectionInfo (optional) connection info from the user to update the connection string,
|
||||
* if left undefined we prompt the user for the connection info
|
||||
* @returns connection string setting name to be used for the createFunction API
|
||||
*/
|
||||
promptAndUpdateConnectionStringSetting(projectUri: vscode.Uri | undefined, connectionInfo?: IConnectionInfo): Promise<IConnectionStringInfo | undefined>;
|
||||
|
||||
/**
|
||||
* Gets the names of the Azure Functions in the file
|
||||
@@ -119,4 +126,12 @@ declare module 'sql-bindings' {
|
||||
azureFunctions: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Result from promptAndUpdateConnectionStringSetting
|
||||
*/
|
||||
export interface IConnectionStringInfo {
|
||||
connectionStringSettingName: string;
|
||||
connectionInfo: IConnectionInfo | undefined;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user