5 ms·
> That's not what http://rethinkdb.com/docs/quickstart/ http://rethinkdb.com/docs/quickstart/ says. It shows a connection that exposes context-bound Builder met
by danielmewes 11y ago
> That's not what http://rethinkdb.com/docs/quickstart/ http://rethinkdb.com/docs/quickstart/ says. It shows a connection that exposes context-bound Builder methods with trigger (insert, changes, run, etc) methods.
I think the confusion stems from the fact that the Quickstart guide assumes that you're running queries in the Data Explorer, a web frontend for prototyping queries. In the Data Explorer, clicking the "Run" button is what triggers the execution of the AST.
If you wrote something like `r.table("tv_shows").insert(...)` in your application code, it wouldn't do anything except for returning an AST object. You can store that object, or call the `run(conn)` method on it to send it over a RethinkDB connection and execute it.
Note that the `r` object in these queries has no state. You can think of it as a namespace that serves as a starting point for building queries.
- ssmoot 11y agoAh. Thank you. Yes, that was definitely unclear to me.