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

Postgres array escaping in where clause broken in 0.12 #1710

Closed
joshrickert opened this issue Sep 30, 2016 · 1 comment
Closed

Postgres array escaping in where clause broken in 0.12 #1710

joshrickert opened this issue Sep 30, 2016 · 1 comment

Comments

@joshrickert
Copy link

joshrickert commented Sep 30, 2016

So, I just updated from 0.11.10 to 0.12.2, and it broke one of my queries. I've confirmed that this occurs on 0.12.0 and 0.12.1 as well.

This used to work:

query.where('array_field', '&&', [7]);

0.11.10 output: (working)

WHERE "array_field" && '{"7"}'

0.12.2 output: (not working)

WHERE "array_field" && {7}

My workaround for now is:

query.whereRaw(`"array_field" && '?'`, [[7]]);
tgriesser added a commit that referenced this issue Oct 9, 2016
@tgriesser tgriesser mentioned this issue Oct 9, 2016
@tgriesser
Copy link
Member

Should be fixed in 0.12.3

tgriesser added a commit that referenced this issue Oct 9, 2016
* master:
  release 0.12.3
  Update changelog
  Fix #1710
  Fix #1694
  release 0.12.2
  Update changelog for 0.12.2 features
  Don't force master as release branch
  Remove unused pool2 dependency
  Fix #1701
  Fix #1675
  Fix for #1691
rslabbert pushed a commit to rslabbert/knex that referenced this issue Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants