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

Method getConnectionWithDB

src/common/database.ts:58–70  ·  view source on GitHub ↗
(connection: IConnection, dbname?: string)

Source from the content-addressed store, hash-verified

56 }
57
58 static getConnectionWithDB(connection: IConnection, dbname?: string): IConnection {
59 if (!dbname) return connection;
60 return {
61 label: connection.label,
62 host: connection.host,
63 user: connection.user,
64 password: connection.password,
65 port: connection.port,
66 database: dbname,
67 multipleStatements: connection.multipleStatements,
68 certPath: connection.certPath
69 };
70 }
71
72 public static async createConnection(connection: IConnection, dbname?: string): Promise<PgClient> {
73 const connectionOptions: any = Object.assign({}, connection);

Callers 3

runMethod · 0.80
getDefaultConnectionMethod · 0.80
getChildrenMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected