async queryResponse(query, values) { const client = await this.pool.connect(); try { await client.query(`SET TIME ZONE '${this.config.storeTimezone || 'UTC'}'`); await client.query(`set statement_timeout to ${(this.config.hasOwnProperty('executionTimeout')) ? this.config.executionTimeout * 1000 : 600000}`); const res = await client.query({ text: query, values: values || [], types: { getTypeParser: (dataType, format) => { const isTimestamp = timestampDataTypes.indexOf(dataType) > -1; let parser = types.getTypeParser(dataType, format); if (isTimestamp) { parser = timestampTypeParser; } return val => parser(val); }, }, }); return res; } finally { await client.release(); } }