R/query-semi-join.R, and 2 more
sql_build() creates a
select_query S3 object, that is rendered
to a SQL string by
sql_render(). The output from
designed to be easy to test, as it's database agnostic, and has
a hierarchical structure. Outside of testing, however, you should
join_query( x, y, vars, type = "inner", by = NULL, suffix = c(".x", ".y"), na_matches = FALSE ) select_query( from, select = sql("*"), where = character(), group_by = character(), having = character(), order_by = character(), limit = NULL, distinct = FALSE ) semi_join_query(x, y, anti = FALSE, by = NULL, na_matches = FALSE) set_op_query(x, y, type = type, all = FALSE) sql_build(op, con = NULL, ...) sql_render(query, con = NULL, ..., subquery = FALSE) sql_optimise(x, con = NULL, ..., subquery = FALSE)
A sequence of lazy operations
A database connection. The default
Other arguments passed on to the methods. Not currently used.
Is this SQL going to be used in a subquery? This is important because you can place a bare table name in a subquery and ORDER BY does not work in subqueries.
sql_build() is generic over the lazy operations, lazy_ops,
and generates an S3 object that represents the query.
takes a query object and then calls a function that is generic
over the database. For example,
sql_select(), which has different methods for different databases.
The default methods should generate ANSI 92 SQL where possible, so you
backends only need to override the methods if the backend is not ANSI