disconnect_cnt: Disconnect (close) the connection of the connector

View source: R/cnt_generics.R

disconnect_cntR Documentation

Disconnect (close) the connection of the connector

Description

Generic implementing of how to disconnect from the relevant connections. Mostly relevant for DBI connectors.

  • ConnectorDBI: Uses DBI::dbDisconnect() to create a table reference to close a DBI connection.

Usage

disconnect_cnt(connector_object, ...)

## S3 method for class 'ConnectorDBI'
disconnect_cnt(connector_object, ...)

Arguments

connector_object

Connector The connector object to use.

...

Additional arguments passed to the method for the individual connector.

Value

invisible connector_object.

Examples

# Open and close a DBI connector
cnt <- connector_dbi(RSQLite::SQLite())

cnt$conn

cnt |>
  disconnect_cnt()

cnt$conn

connector documentation built on June 8, 2025, 11:36 a.m.