@knorm/postgres
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -477,13 +477,16 @@ const { Knorm } = require('@knorm/knorm'); | ||
const client = await this.acquireClient(); | ||
const newSql = await this.beforeQuery(client, sql); | ||
sql = newSql || sql; | ||
try { | ||
const newSql = await this.beforeQuery(client, sql); | ||
const result = await client.query(formatSql(sql)); | ||
const newResult = await this.afterQuery(client, sql, result); | ||
const { rows } = newResult || result; | ||
sql = newSql || sql; | ||
await this.releaseClient(client); | ||
const result = await client.query(formatSql(sql)); | ||
const newResult = await this.afterQuery(client, sql, result); | ||
const { rows } = newResult || result; | ||
return rows; | ||
return rows; | ||
} finally { | ||
await this.releaseClient(client); | ||
} | ||
} | ||
@@ -490,0 +493,0 @@ |
{ | ||
"name": "@knorm/postgres", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Postgres plugin for knorm", | ||
@@ -19,20 +19,25 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"@knorm/knorm": "^1.7.0", | ||
"@knorm/knorm": "^1.9.0", | ||
"@knorm/relations": "^1.2.3" | ||
}, | ||
"devDependencies": { | ||
"@knorm/knorm": "^1.9.0", | ||
"@knorm/relations": "^1.2.3", | ||
"coveralls": "^3.0.0", | ||
"eslint": "^4.15.0", | ||
"eslint-config-ganintegrity": "^2.0.2", | ||
"knex": "^0.15.0", | ||
"mocha": "^5.1.1", | ||
"npm-run-all": "^4.1.2", | ||
"nyc": "^12.0.1", | ||
"prettier": "^1.10.2", | ||
"sinon": "^6.0.0", | ||
"unexpected": "^10.37.7", | ||
"unexpected-knex": "^1.2.1", | ||
"unexpected-sinon": "^10.8.2" | ||
"@knorm/knorm": "1.9.0", | ||
"@knorm/relations": "1.2.3", | ||
"@semantic-release/changelog": "3.0.0", | ||
"@semantic-release/git": "7.0.4", | ||
"@semantic-release/github": "5.0.5", | ||
"@semantic-release/npm": "5.0.4", | ||
"coveralls": "3.0.2", | ||
"eslint": "4.19.1", | ||
"eslint-config-ganintegrity": "2.0.2", | ||
"knex": "0.15.2", | ||
"mocha": "5.2.0", | ||
"npm-run-all": "4.1.3", | ||
"nyc": "13.0.1", | ||
"prettier": "1.12.1", | ||
"semantic-release": "15.9.16", | ||
"sinon": "6.3.5", | ||
"unexpected": "10.39.1", | ||
"unexpected-knex": "1.2.1", | ||
"unexpected-sinon": "10.10.1" | ||
}, | ||
@@ -39,0 +44,0 @@ "directories": { |
@@ -7,3 +7,2 @@ # @knorm/postgres | ||
[![dependency status](https://david-dm.org/knorm/postgres.svg)](https://david-dm.org/knorm/postgres) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/knorm/postgres.svg)](https://greenkeeper.io/) | ||
@@ -10,0 +9,0 @@ Postgres plugin for [@knorm/knorm](https://www.npmjs.com/package/@knorm/knorm) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
114657
17
2896
19
148