SQLConnectionLease
classin packageklyn.data.sql.internal
public final class SQLConnectionLease implements AutoClosable:
SQLConnectionLease
All Implemented Interfaces: AutoClosable

Scoped SQL connection access used by one provider operation.

A direct repository lease owns its connection. A manager session lease borrows the session connection and therefore leaves it open for transaction continuity.

try lease = session.openConnection():
statement = lease.connection.statement()
Properties
Modifier and Type Member Description
public readonly property connection
connection as Connection
Open low-level SQL connection.
Constructors
Modifier and Type Member Description
public SQLConnectionLease
SQLConnectionLease(connection as Connection, ownsConnection as Boolean):
Creates an owned or borrowed connection lease.
Methods
Modifier and Type Member Description
public close
close() as Void:
Releases an owned connection idempotently.
Inherited Methods
methodInherited Methods from AutoClosable: close