MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / query

Method query

lib/interfaces/database.ts:105–113  ·  view source on GitHub ↗
(sql: string, args?: any[])

Source from the content-addressed store, hash-verified

103 }
104
105 public async query<T>(sql: string, args?: any[]) {
106 if (!this.db) {
107 await this.connectToPostgres();
108 }
109
110 const result = await this.db!.queryObject<T>(sql, args);
111
112 return result.rows;
113 }
114}
115
116// This allows us to have nice SQL syntax highlighting in template literals

Callers 15

runMigrationsFunction · 0.80
updateMethod · 0.80
deleteMethod · 0.80
updateMethod · 0.80
deleteMethod · 0.80
updateMethod · 0.80
deleteMethod · 0.80
createMethod · 0.80
validateMethod · 0.80
updateMethod · 0.80
deleteMethod · 0.80
updateMethod · 0.80

Calls 1

connectToPostgresMethod · 0.95

Tested by

no test coverage detected