Add createAzureFunction to extension API (#19438)

This commit is contained in:
Charles Gagnon
2022-05-19 13:02:49 -07:00
committed by GitHub
parent 79875c0b95
commit 4c008059df
2 changed files with 9 additions and 1 deletions

View File

@@ -20,6 +20,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus> => { addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus> => {
return addSqlBinding(bindingType, filePath, functionName, objectName, connectionStringSetting); return addSqlBinding(bindingType, filePath, functionName, objectName, connectionStringSetting);
}, },
createAzureFunction: async (): Promise<void> => {
return createAzureFunction();
},
promptForBindingType: async (funcName?: string): Promise<BindingType | undefined> => { promptForBindingType: async (funcName?: string): Promise<BindingType | undefined> => {
return promptForBindingType(funcName); return promptForBindingType(funcName);
}, },

View File

@@ -28,6 +28,11 @@ declare module 'sql-bindings' {
*/ */
addSqlBinding(bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus>; addSqlBinding(bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus>;
/**
* Prompts the user for information to create an Azure Function with SQL Binding
*/
createAzureFunction(): Promise<void>;
/** /**
* Prompts the user to select type of binding and returns result or undefined if the user cancelled out of the prompt * Prompts the user to select type of binding and returns result or undefined if the user cancelled out of the prompt
* @param funcName (Optional) Name of the function we are adding the SQL Binding to * @param funcName (Optional) Name of the function we are adding the SQL Binding to