Skip to contents

Ensure that connection to database is disconnected consistently

Usage

cas_disconnect_from_db(
  db_connection = NULL,
  db_type = NULL,
  use_db = NULL,
  disconnect_db = FALSE
)

Arguments

db_connection

Defaults to NULL. If NULL, and database is enabled, castarter will use a local sqlite database. A custom connection to other databases can be given (see vignette castarter_db_management for details).

use_db

Defaults to NULL. If given, it should be given either TRUE or FALSE. Typically set with cas_enable_db() or cas_disable_db().

disconnect_db

Defaults to TRUE. If FALSE, leaves the connection to database open.

Value

Nothing, used for its side effects.

Examples

cas_disconnect_from_db()