2 ms·
Queries like the one you wrote above are indeed quite idiomatic but something as simple as providing a `read_mode` requires a query builder- (r/get (rethink
by krat0sprakhar 11y ago
Queries like the one you wrote above are indeed quite idiomatic but something as simple as providing a `read_mode` requires a query builder-
(r/get (rethinkdb.query-builder/term
:TABLE [(query/db db) table]
{:read_mode read_mode}) id)]))
whereas in JS, you can simply do
r.db('heroes').table('marvel', {readMode: 'outdated'}).run(conn, callback)
- hardwaresofton 11y agoThanks for the example -- while I have never needed to actually change the read mode, you shouldn't need to actually use that query buider, read mode is an optional argument to r/table. Apologize if I misunderstood what you were trying to do, or if this was a relatively recent addition that wasn't available last you used clj-rethinkdb. Here's an example (from tests in the repo): https://github.com/apa512/clj-rethinkdb/blob/1cd09c7c8a4ce271a6cd35fdaa023c823b3465e1/test/rethinkdb/core_test.clj#L122 https://github.com/apa512/clj-rethinkdb/blob/1cd09c7c8a4ce27...