connection_check_leaks: Check for leaked database connections

View source: R/connection_helpers.R

connection_check_leaksR Documentation

Check for leaked database connections

Description

Scans the global environment and parent frames for open database connections. Useful for debugging connection leaks in interactive sessions or long-running scripts.

Usage

connection_check_leaks(warn = TRUE)

Arguments

warn

Logical. If TRUE (default), emits a warning if leaked connections found

Value

A data frame with information about open connections:

  • object_name: Name of the variable holding the connection

  • class: Connection class (e.g., "PqConnection", "SQLiteConnection")

  • valid: Whether connection is still valid


framework documentation built on Feb. 18, 2026, 1:07 a.m.