Fix #434, add returning config option

This commit is contained in:
Tim Griesser 2014-08-24 14:41:48 -04:00
parent cd4864e740
commit 83b2c2b078
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ var pg;
// 'lib/query/compiler', respectively.
function Client_PG(config) {
Client.apply(this, arguments);
if (config.returning) this.defaultReturning = config.returning;
if (config.debug) this.isDebugging = true;
if (config.connection) {
this.initDriver();

View File

@ -14,6 +14,9 @@ var QueryCompiler = require('../../query/compiler');
function QueryBuilder_PG() {
this.client = client;
QueryBuilder.apply(this, arguments);
if (client.defaultReturning) {
this._single.returning = client.defaultReturning;
}
}
inherits(QueryBuilder_PG, QueryBuilder);