Skip to content

Commit

Permalink
Fix parsing bindParameters
Browse files Browse the repository at this point in the history
it fixes the issue [17322]
  • Loading branch information
tfiliano committed May 10, 2024
1 parent 6aba382 commit aa50f01
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/dialects/oracle/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ export class OracleQuery extends AbstractQuery {
} else if (this.isRawQuery()) {
this.bindParameters = parameters;
} else {
Object.values(parameters).forEach(value => {
bindParameters.push(value);
});
let matcher = new RegExp(/(:)(([^\d])\w+)/gm)
while ( result = matcher.exec(this.sql) ) {

Check failure on line 128 in src/dialects/oracle/query.js

View workflow job for this annotation

GitHub Actions / Lint code and docs

Expected a conditional expression and instead saw an assignment

Check failure on line 128 in src/dialects/oracle/query.js

View workflow job for this annotation

GitHub Actions / Lint code and docs

'result' is not defined
bindParameters.push(parameters[result[2]])

Check failure on line 129 in src/dialects/oracle/query.js

View workflow job for this annotation

GitHub Actions / Lint code and docs

'result' is not defined
}
// Object.values(parameters).forEach(value => {
// bindParameters.push(value);
// });
bindParameters.push(...outParameters);
Object.assign(this.bindParameters, bindParameters);
}
Expand Down

0 comments on commit aa50f01

Please sign in to comment.