@@ -8,40 +8,13 @@ class PostgresConnection extends AbstractConnection {
88 super ( config ) ;
99 }
1010
11- // async query(queryName, queryParams, queryOptions = null) {
12- // const self = this;
13- //
14- // // let timeOld;
15- // // if (queryOptions && queryOptions.time) {
16- // // timeOld = Date.now();
17- // // }
18- //
19- // const data = await self.client.query(self.queries[queryName], queryParams);
20- // const {rows} = data;
21- //
22- // // if (queryOptions && queryOptions.time) {
23- // // log.info(`Query ${queryName} execution time: ${Date.now() - timeOld} ms`);
24- // // }
25- //
26- // return rows;
27- // }
2811 async _executeQuery ( query ) {
2912 const { rows} = await this . client . query ( query ) ;
3013 return rows ;
3114 }
3215
3316 async rawQuery ( queryText , queryParams , queryOptions = null ) {
34- // let timeOld;
35- // if (queryOptions && queryOptions.time && queryOptions.queryName) {
36- // timeOld = Date.now();
37- // }
38-
3917 const { rows} = await this . client . query ( queryText , queryParams ) ;
40-
41- // if (queryOptions && queryOptions.time) {
42- // log.info(`Query ${queryOptions.queryName} execution time: ${Date.now() - timeOld} ms`);
43- // }
44-
4518 return rows ;
4619 }
4720
@@ -56,9 +29,8 @@ class PostgresConnection extends AbstractConnection {
5629 }
5730
5831 const preparedQuery = escapeParams ( queryText , queryParams ) ;
59- console . log ( preparedQuery ) ;
6032
61- // return this._executeQuery(preparedQuery);
33+ return this . _executeQuery ( preparedQuery ) ;
6234 }
6335
6436 getQueryText ( queryName ) {
0 commit comments