()
| 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 | } |
nothing calls this directly
no test coverage detected