Skip to content

This function creates a lazy tbl object from a table in a database. It's primarily intended for backend authors who need to create custom subclasses; most users should use dplyr::tbl() instead.

Usage

tbl_sql(subclass, src, from, ..., vars = NULL, check_from = deprecated())

Arguments

subclass

name of subclass

src

A DBIConnection object produced by DBI::dbConnect().

from

Either a table identifier or a literal sql() string.

Use a string to identify a table in the current schema/catalog or I() for a table elsewhere, e.g. I("schema.table") or I("catalog.schema.table"). For backward compatibility, you can also use in_schema()/in_catalog() or DBI::Id().

...

needed for agreement with generic. Not otherwise used.

vars

Optionally, provide a character vector of column names. If not supplied, will be retrieved from the database by running a simple query. This argument is mainly useful for better performance when creating many tbls with known variables.

check_from

[Deprecated]