| 9 | import { getCompiledLSPBinaryPath, sqlsDriverFromDriver } from './lsp'; |
| 10 | |
| 11 | export function deleteConnectionConfiguration( |
| 12 | context: vscode.ExtensionContext, |
| 13 | connectionsSidepanel: SQLNotebookConnections |
| 14 | ) { |
| 15 | return async (item: ConnectionListItem) => { |
| 16 | const without = context.globalState |
| 17 | .get<ConnData[]>(storageKey, []) |
| 18 | .filter(({ name }) => name !== item.config.name); |
| 19 | context.globalState.update(storageKey, without); |
| 20 | await context.secrets.delete(item.config.name); |
| 21 | |
| 22 | connectionsSidepanel.refresh(); |
| 23 | vscode.window.showInformationMessage( |
| 24 | `Successfully deleted connection configuration "${item.config.name}"` |
| 25 | ); |
| 26 | connectionsSidepanel.refresh(); |
| 27 | }; |
| 28 | } |
| 29 | |
| 30 | export function connectToDatabase( |
| 31 | context: vscode.ExtensionContext, |