connector_dbi | R Documentation |
dbi
connectorInitializes the connector for DBI type of storage. See ConnectorDBI for details.
connector_dbi(drv, ..., extra_class = NULL)
drv |
Driver object inheriting from DBI::DBIDriver. |
... |
Additional arguments passed to |
extra_class |
character Extra class to assign to the new connector. |
The extra_class
parameter allows you to create a subclass of the
ConnectorDBI
object. This can be useful if you want to create
a custom connection object for easier dispatch of new s3 methods, while still
inheriting the methods from the ConnectorDBI
object.
A new ConnectorDBI object
# Create DBI connector
cnt <- connector_dbi(RSQLite::SQLite(), ":memory:")
cnt
# Create subclass connection
cnt_subclass <- connector_dbi(RSQLite::SQLite(), ":memory:",
extra_class = "subclass"
)
cnt_subclass
class(cnt_subclass)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.