mirror of
https://github.com/knex/knex.git
synced 2025-12-28 23:48:58 +00:00
Fixed returning bug with oracle
Fixes non working returning() with oracle introduced with #580 (strong-oracle support)
This commit is contained in:
parent
e9782a8932
commit
5cd47fab98
@ -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.
|
||||
@ -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') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user