data PG::Lease

What a connection is made of, as a Shareable value: its socket and the session's state, so that it can move to another task, which makes a PG::Connection of it again (PG::Connection#release, PG::Connection.adopt). PG::Pool keeps its idle connections so.

src/connection.qz:80

Methods

def with(*, io: IO = …, config: PG::Config = …, process_id: Int = …, secret: Bytes = …, parameters: Hash[String, String] = …, statements: PG::StatementCache::Snapshot = …, notifications: Array[PG::Notification] = …, channels: Set[String] = …, unsure: Bool = …) -> PG::Lease

A copy with the fields given replaced.

src/connection.qz:80

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

src/connection.qz:80

def io -> IO

src/connection.qz:81

def config -> PG::Config

src/connection.qz:82

def process_id -> Int

src/connection.qz:83

def secret -> Bytes

src/connection.qz:84

def parameters -> Hash[String, String]

src/connection.qz:85

def statements -> PG::StatementCache::Snapshot

src/connection.qz:86

def notifications -> Array[PG::Notification]

The notifications received and not yet taken, and the channels listened to (PG::Connection#listen).

src/connection.qz:89

def channels -> Set[String]

src/connection.qz:90

def unsure -> Bool

Whether a LISTEN may be in force that channels does not show.

src/connection.qz:92