class ActiveRecord::ConnectionAdapters::ConnectionPool

def active_connection?

Experimental RBS support (using type sampling data from the type_fusion project).

def active_connection?: () -> ActiveRecord::ConnectionAdapters::PostgreSQLAdapter?

This signature was generated using 42 samples from 1 application.

#checkout will not be detected by #active_connection?
#connection or #with_connection methods. Connections obtained through
This method only works for connections that have been obtained through

Returns true if there is an open connection being used for the current thread.
def active_connection?
  @thread_cached_conns[connection_cache_key(current_thread)]
end