Skip to content

Commit

Permalink
Fixed returning bug with oracle
Browse files Browse the repository at this point in the history
Fixes non working returning() with oracle introduced with #580 (strong-oracle support)
  • Loading branch information
vschoettke committed Mar 16, 2015
1 parent e9782a8 commit 5cd47fa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/dialects/oracle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ var _ = require('lodash');
var Client = require('../../client');
var Promise = require('../../promise');

var oracle;

// Always initialize with the "QueryBuilder" and "QueryCompiler"
// objects, which extend the base 'lib/query/builder' and
// 'lib/query/compiler', respectively.
Expand Down Expand Up @@ -131,11 +129,13 @@ Client_Oracle.prototype.preprocessBindings = function(bindings) {
if (!bindings) {
return bindings;
}


var driver = this.driver;

return bindings.map(function(binding) {
if (binding instanceof ReturningHelper && oracle) {
if (binding instanceof ReturningHelper && driver) {
// returning helper uses always ROWID as string
return new oracle.OutParam(oracle.OCCISTRING);
return new driver.OutParam(driver.OCCISTRING);
}

if (typeof binding === 'boolean') {
Expand Down

0 comments on commit 5cd47fa

Please sign in to comment.