rethinkdb / rethinkdb-rs

A native RethinkDB driver written in Rust
Apache License 2.0
210 stars 27 forks source link

Rust Library Not Documented #65

Closed mirateOfficial closed 2 years ago

mirateOfficial commented 2 years ago

Using reql 0.10.4 with Rust trying to figure out to set a primary index on a table and more importantly how to use secondary indices when querying. It's telling me order_by for example only takes a string as an input but the notation on the RethinkDB website is order_by(index: r.desc("column")). I tried using r.args() but I can not get this to work, can someone please post a usable example for an indexed query?

srh commented 2 years ago

You can see an example using order_by at https://github.com/rethinkdb/rethinkdb-rs/blob/main/reql/tests/order_by.rs

The code implementing it is at https://github.com/rethinkdb/rethinkdb-rs/blob/824bd97137bc5367d700bbb1318fa2064673af10/reql/src/cmd.rs#L473

Closing as this is not a help channel.

mirateOfficial commented 2 years ago

Thanks!