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
Closed

Latest version broke postgres array operations #226

ericeslinger opened this issue Mar 30, 2014 · 2 comments
Labels

Comments

@ericeslinger
Copy link
Contributor

@ericeslinger 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
Copy link
Member

@tgriesser tgriesser commented Mar 31, 2014

Sorry about that, should be fixed!

Loading

elliotf pushed a commit to elliotf/knex that referenced this issue Nov 24, 2014
@chrisjhoughton
Copy link

@chrisjhoughton 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!

Loading

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
3 participants