Class: Sqlx::Database::LeaseToken
Overview
One checked-out pool position. The pool owns the connection array; the token carries only the position, so the shared lease code never names a concrete connection type (spinel types the adapter's own array concretely).
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(pool, index) ⇒ LeaseToken
constructor
A new instance of LeaseToken.
- #release(conn, finished) ⇒ Object
Constructor Details
#initialize(pool, index) ⇒ LeaseToken
Returns a new instance of LeaseToken.
25 26 27 28 |
# File 'runtime/database/lease.rb', line 25 def initialize(pool, index) @pool = pool @index = index end |