struct CQL::Postgres::ConnectionReset

Overview

Puts a connection back in a clean state before the pool lends it again: rolls back a transaction the borrower left open, then runs the optional reset statement (DISCARD ALL, RESET ALL, ...) followed by the pool's setup hook, which a reset would otherwise undo. The result says whether the connection may be reused; any failure means it must be dropped.

Defined in:

postgres/connection_reset.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(sql : String | Nil, setup : Proc(Connection, Nil) | Nil, timeout : Time::Span) #

[View source]

Instance Method Detail

def call(connection : Connection) : Bool #

[View source]