SQL database resource client
SQL database resource client
A R6 object of class SQLResourceClient
resourcer::ResourceClient
-> SQLResourceClient
new()
Creates a SQLResourceClient from a resource.
SQLResourceClient$new(resource, dbi.connector = NULL)
resource
The resource object.
dbi.connector
An optional DBIResourceConnector object. If not provided, it will be looked up in the DBIResourceConnector registry.
The SQLResourceClient object.
getConnection()
Get or create the DBI connection object that will access the resource.
SQLResourceClient$getConnection()
The DBI connection object.
asDataFrame()
Coerce the SQL table to a data.frame.
SQLResourceClient$asDataFrame(...)
...
Additional parameters (not used).
A data.frame (more specifically a tibble).
asTbl()
Get the SQL table as a dplyr's tbl.
SQLResourceClient$asTbl()
A dplyr's tbl object.
getTableName()
Get the SQL table name from the resource URL.
SQLResourceClient$getTableName()
The SQL table name.
close()
Silently close the DBI connection.
SQLResourceClient$close()
clone()
The objects of this class are cloneable with this method.
SQLResourceClient$clone(deep = FALSE)
deep
Whether to make a deep clone.
Resource client that connects to a SQL database supported by DBI.