&gt; It&#x27;s an odd choice (to me) to use a context bound Builder as opposed to an AST Builder you just pass to connection.execute or something.<p>But that&#x27;s what RethinkDB&#x27;s query builder is.  You construct a free-standing AST, let&#x27;s call it x, then call x.run(conn) or (IIRC) conn.run(x) to run it.<p>Edit: &gt; You can syntax check ... O&#x2F;R Mappers ...<p>It&#x27;s not a dichotomy between SQL and O&#x2F;R mappers here, and sorry if you weren&#x27;t trying to imply that.  An SQL query building API can easily be understood by developers that know SQL (correct me if I&#x27;m wrong), you don&#x27;t need to syntax check it, and it survives refactorings just as well.  And it&#x27;s hard not to need to dynamically construct queries anyway.