-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added support for the contains query operator #11
Conversation
The "contains" operator needs to work for arrays as well (see how it's implemented in js-data.js ). Also, can you remove your changes to |
Just to be clear, when you say it should work with arrays, do you mean
I'll need to investigate ReQL to check to see if this is possible. The contains operator in ReQL needs to work in conjunction with the match operator, it seems to me. http://rethinkdb.com/api/javascript/contains/ I'll close this and create another, without the changes to |
Looking at http://www.js-data.io/docs/query-syntax It seems like option 1 is the requirement.
Is there a simple way to tell whether |
I'm not for sure on how to implement it, which is why I didn't implement it in the first place. |
Ah, ok. It's not worth implementing it for at least the first case (string matching) then? And then add the second case later? Under normal circumstances, I'd expect these to be 2 different operations (as they are in MongoDB and RethinkDB). In any NoSQL DB, since a column can have any "type", it might prove problematic to determine which type a column is. Might it make more sense (and more work) to split them into 2 separate ops:
And
|
I'll have to think about it some more. js-data-sql actually has a "like" operator. I want consistency across the store and the adapters. |
Grand. Thanks. — On Mon, Sep 7, 2015 at 5:29 PM, Jason Dobry [email protected]
|
This should fix #10.
I've made the query case-insensitive. I guess it would be better for this to be an option, but I couldn't see a reasonable way to do that.
Thanks.