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

Comments

Projects
None yet
2 participants
@joshrickert

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 referenced this issue Oct 9, 2016

Merged

0.12.3 #1731

@tgriesser tgriesser closed this in fa30dfb Oct 9, 2016

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Oct 9, 2016

Should be fixed in 0.12.3

tgriesser added a commit that referenced this issue Oct 9, 2016

Merge branch 'master' into refactor
* 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

RubenSlabbert added a commit to RubenSlabbert/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