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

Method getChildren

src/tree/funcFolderNode.ts:27–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }
26
27 public async getChildren(): Promise<INode[]> {
28 const connection = await Database.createConnection(this.connection);
29
30 try {
31 let query = SqlQueryManager.getVersionQueries(connection.pg_version);
32 const res = await connection.query(query.GetFunctions, [this.schemaName]);
33
34 return res.rows.map<FunctionNode>(func => {
35 var args = func.argument_types != null ? func.argument_types.split(',').map(arg => {
36 return String(arg).trim();
37 }) : [];
38 return new FunctionNode(this.connection, func.name, args, func.result_type, func.schema, func.description);
39 })
40 } catch(err) {
41 return [new InfoNode(err)];
42 } finally {
43 await connection.end();
44 }
45 }
46}

Callers

nothing calls this directly

Calls 2

createConnectionMethod · 0.80
getVersionQueriesMethod · 0.80

Tested by

no test coverage detected