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

Comments

Projects
None yet
2 participants
@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: {} }

@tgriesser tgriesser added the bug label Jun 1, 2015

@tgriesser tgriesser closed this in cf757a5 Jun 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment