This function is used at the end of user-facing functions to query the database. It limits the query to some number of rows and collects if if specified.

make_tbl_output(tbl, limit, lazy)

Arguments

tbl

A query from conn with dbplyr and lazily evaluated.

limit

LIMIT of the query. A positive integer or Inf. Default is Inf, in which case all records are returned.

lazy

If TRUE, does not collect() the query into a dataframe. This is useful if other tables from the database are joined later on.

Value

A query, evaluated with limit and lazy.