mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 09:35:39 -05:00
Show function name when prompting user for sql binding type (#19336)
This commit is contained in:
@@ -285,8 +285,9 @@ export async function isFunctionProject(folderPath: string): Promise<boolean> {
|
||||
|
||||
/**
|
||||
* Prompts the user to select type of binding and returns result
|
||||
* @param funcName (Optional) Name of the function to which we are adding the SQL Binding
|
||||
*/
|
||||
export async function promptForBindingType(): Promise<BindingType | undefined> {
|
||||
export async function promptForBindingType(funcName?: string): Promise<BindingType | undefined> {
|
||||
const inputOutputItems: (vscode.QuickPickItem & { type: BindingType })[] = [
|
||||
{
|
||||
label: constants.input,
|
||||
@@ -300,7 +301,7 @@ export async function promptForBindingType(): Promise<BindingType | undefined> {
|
||||
|
||||
const selectedBinding = (await vscode.window.showQuickPick(inputOutputItems, {
|
||||
canPickMany: false,
|
||||
title: constants.selectBindingType,
|
||||
title: constants.selectBindingType(funcName),
|
||||
ignoreFocusOut: true
|
||||
}));
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export const yesString = localize('yesString', "Yes");
|
||||
export const noString = localize('noString', "No");
|
||||
export const input = localize('input', "Input");
|
||||
export const output = localize('output', "Output");
|
||||
export const selectBindingType = localize('selectBindingType', "Select type of binding");
|
||||
export function selectBindingType(funcName?: string): string { return funcName ? localize('selectBindingTypeToSpecifiedFunction', "Select type of binding for the function '{0}'", funcName) : localize('selectBindingType', "Select type of binding"); }
|
||||
export const selectAzureFunction = localize('selectAzureFunction', "Select an Azure function in the current file to add SQL binding to");
|
||||
export const sqlTableOrViewToQuery = localize('sqlTableOrViewToQuery', "SQL table or view to query");
|
||||
export const sqlTableToUpsert = localize('sqlTableToUpsert', "SQL table to upsert into");
|
||||
|
||||
Reference in New Issue
Block a user