Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api break 0.7 -> 0.8, raw binding are not optional #853

Closed
jfgodoy opened this issue May 31, 2015 · 0 comments
Closed

api break 0.7 -> 0.8, raw binding are not optional #853

jfgodoy opened this issue May 31, 2015 · 0 comments
Labels

Comments

@jfgodoy
Copy link

@jfgodoy jfgodoy commented May 31, 2015

if the second argument in knex.raw(sql, [bindings]) is not setted, when two raws are merged, the undefined value is added as a binding value. see the next example:

knex.raw('select * from ? where id=?', [knex.raw('foo'), 4]).toSQL()
{ method: 'raw',
  sql: 'select * from foo where id=?',
  bindings: [ undefined, 4 ],
  options: {} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants