How do I query an array field by maching exact values of an array?

36 views
Skip to first unread message

Aleksey Izmailov

unread,
Oct 2, 2013, 4:02:54 PM10/2/13
to rogue...@googlegroups.com
Hi all,

I can't find a way to query by exact value of an array field in Rogue. It should be something like that:

Venue.where(_.tags eqs List("db", "ka")).toString() must_== """db.venues.find({ "tags" : [ "db" , "ka"]})"""

Described in MongoDB docs here: http://docs.mongodb.org/manual/tutorial/query-documents/#exact-match-on-an-array

I see there are other operators available in Rogue like 'neqs', 'in', 'all', etc., but they don't exactly match the functionality of 'eqs' because I want to say that these 2 arrays must be equal.
Perhaps I'm missing something?!

Thanks

Jason Liszka

unread,
Oct 2, 2013, 4:15:49 PM10/2/13
to rogue...@googlegroups.com
You're right, we're missing support for that. I added it and it will be part of the next release (probably Friday).




--
You received this message because you are subscribed to the Google Groups "rogue-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rogue-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Aleksey Izmailov

unread,
Oct 2, 2013, 4:28:11 PM10/2/13
to rogue...@googlegroups.com
Nice! Thanks a lot!
Reply all
Reply to author
Forward
0 new messages