MCPcopy Create free account
hub / github.com/Borvik/vscode-postgres / setSSL

Method setSSL

src/commands/addConnection.ts:126–141  ·  view source on GitHub ↗
(input: MultiStepInput, state: Partial<ConnectionState>)

Source from the content-addressed store, hash-verified

124 }
125
126 async setSSL(input: MultiStepInput, state: Partial<ConnectionState>) {
127 let active = sslOptions.find(s => s.ssl === !!state.secure);
128 state.secure = await input.showQuickPick({
129 title: this.TITLE,
130 step: input.CurrentStepNumber,
131 totalSteps: this.TotalSteps,
132 placeholder: 'Use an ssl connection?',
133 ignoreFocusOut: true,
134 items: sslOptions,
135 activeItem: active || undefined,
136 convert: async (value: SSLQuickPickItem) => value.ssl
137 });
138 if (typeof state.secure === 'undefined')
139 state.secure = false;
140 return (input: MultiStepInput) => this.setDatabase(input, state);
141 }
142
143 async setDatabase(input: MultiStepInput, state: Partial<ConnectionState>) {
144 // first need the databases

Callers 1

setPortMethod · 0.95

Calls 2

setDatabaseMethod · 0.95
showQuickPickMethod · 0.80

Tested by

no test coverage detected