Comment by vertex-four

8 years ago

Something quite similar is used in some RethinkDB drivers, especially around lambdas. For example:

    r.table('users').filter(lambda user:
        user["age"] == 30
    ).run(conn)

The lambda there is actually only ever called once, on the client-side, with an equivalent of your ASTVariable, to generate an AST of the comparison which is sent to the server and processed there.