apa512 / clj-rethinkdb

Eclipse Public License 1.0
205 stars 42 forks source link

View rethink queries as JS? #174

Closed Samstiles closed 8 years ago

Samstiles commented 8 years ago

I seem to recall (many moons ago) there was a way to log the actual javascript query being sent to RethinkDB upon send, is it still possible to inspect this via some config property or something? If not could someone point me in the direction of where in the codebase I might add that functionality myself? I'm going to start digging around for it now.

apa512 commented 8 years ago

I don't think we've ever logged all queries being sent, but you can generate them yourself using rethinkdb.query-builder/parse-term.

(parse-term (r/get (r/table :my_table) 34))
=> (16 ((15 (:my_table)) 34))

The output converted to JSON is what's being sent to the server.

Samstiles commented 8 years ago

Thanks @apa512 !