disconnect_connection: Disconnect Database Connection

View source: R/disconnect_connection.R

disconnect_connectionR Documentation

Disconnect Database Connection

Description

Safely disconnects an established database connection using the DBI package.

Usage

disconnect_connection(con)

Arguments

con

A database connection object created by DBI::dbConnect or any similar function that establishes a connection to a database.

Value

TRUE, invisibly. Throws an error if the disconnection fails.

See Also

Other WRDS functions: download_data_wrds(), download_data_wrds_ccm_links(), download_data_wrds_compustat(), download_data_wrds_crsp(), download_data_wrds_fisd(), download_data_wrds_trace_enhanced(), get_wrds_connection(), set_wrds_credentials()

Examples

## Not run: 
con <- get_wrds_connection()
disconnect_connection(con)

## End(Not run)

tidyfinance documentation built on June 1, 2026, 1:06 a.m.