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

Latest version broke postgres array operations #226

Closed
ericeslinger opened this Issue Mar 30, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@ericeslinger
Copy link
Contributor

ericeslinger commented Mar 30, 2014

I used to be able to do a .where{'array_col', '&&', array_vals}-style query. This is no longer the case.

@tgriesser tgriesser added the bug label Mar 31, 2014

@tgriesser tgriesser closed this in d71c9bf Mar 31, 2014

@tgriesser tgriesser added the fixed label Mar 31, 2014

@tgriesser

This comment has been minimized.

Copy link
Owner

tgriesser commented Mar 31, 2014

Sorry about that, should be fixed!

elliotf pushed a commit to elliotf/knex that referenced this issue Nov 24, 2014

@chrisjhoughton

This comment has been minimized.

Copy link

chrisjhoughton commented Jul 4, 2015

Sorry to bring this up here, but I haven't found another related thread.

When I run:

query.where('tags', '&&', ["volusion", "sauce-facebook", "wholesale"]);

It translates to the following query:

select from "users" 
where "client" = '55773883aaf6b3df7996dc89' 
and "tags" && '{\"volusion\",\"sauce-facebook\",\"wholesale\"}') 

The tags in the value are getting escaped, which is causing the Postgres array overlap query not to work. Am I doing something silly?

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.