Test whether an object is a dbi.table, or coerce it if possible.
Usage
is.dbi.table(x)
as.dbi.table(conn, x, type = c("auto", "query", "temporary"))
Value
a dbi.table.
Arguments
x
any R object.
conn
a connection handle returned by dbConnect.
Alternatively, conn may be a dbi.table or a
dbi.catalog; in these cases, the connection handle
is extracted from the provided object.
type
a character string. Possible choices are "auto",
"query", and "temporary". See Details. The default
"auto" uses In Query tables when x has 500
or fewer rows or when creating a temporary table on the database
fails.
Details
Two types of tables are provided: Temporary (when
type == "temporary") and In Query
(when type == "query"). For Temporary, the data are
written to a SQL temporary table and the associated
dbi.table is returned. For In Query, the data are
written into a CTE as part of the query itself - useful when the
connection does not permit creating temporary tables.