apa512 / clj-rethinkdb

Eclipse Public License 1.0
205 stars 42 forks source link

support compound indexes as a vector #166

Open thedavidmeister opened 8 years ago

thedavidmeister commented 8 years ago

rethinkdb lets us define compound indexes without needing a function if we pass an array of values.

https://www.rethinkdb.com/docs/secondary-indexes/javascript/

screen shot 2016-05-17 at 1 49 06 am

It would be good if we could do something similar like:

(r/index-create (r/table "users") "full_name" ["first_name" "last_name"])
apa512 commented 8 years ago

The official clients convert the array to a function but I guess we could do the same (just pointing out that RethinkDB actually only supports field name or function in case someone else wants to add this).