Connection
interfacein packageklyn.databases.sql
public interface Connection extends AutoClosable:
SQL connection contract inspired by `java.sql.Connection`.
The Klyn adaptation exposes connection state as properties instead of a
getter/setter-heavy surface.
import klyn.databases.sql
connection as Connection = DriverManager.connect("jdbc:postgresql://db/app")
connection.autoCommit = false
Fields
Properties
| Modifier and Type |
Member |
Description |
| public property |
autoCommit |
True when each statement is committed immediately. |
| public property |
catalog |
Current catalog when supported by the driver. |
| public readonly property |
clientInfo |
Mutable client-info map. |
| public readonly property |
closed |
True when the connection has been closed. |
| public readonly property |
connected |
True when the connection has been opened. |
| public property |
holdability |
Current result-set holdability. |
| public readonly property |
metadata |
Database metadata facade. |
| public property |
networkTimeoutMillisnetworkTimeoutMillis as Int |
Network timeout in milliseconds. |
| public property |
readOnly |
True when the connection is read-only. |
| public property |
schema |
Current schema when supported by the driver. |
| public readonly property |
sslContext |
Optional TLS context used by the underlying secure transport. |
| public property |
transactionIsolation |
Current transaction isolation level. |
| public readonly property |
url |
Effective connection URL. |
| public readonly property |
userName |
Effective user name. |
| public readonly property |
warning |
Current warning chain. |
Methods
| Modifier and Type |
Member |
Description |
| public |
clearWarnings clearWarnings() as Void
|
Clears the warning chain. |
| public |
commit |
Commits the current transaction. |
| public |
isValid |
Returns true when the connection is still usable. |
| public |
nativeSql |
Converts generic SQL to the driver-native dialect. |
| public |
releaseSavepoint |
Releases one savepoint. |
| public |
rollback |
Rolls back the current transaction or one savepoint. |
| public |
savepoint |
Creates a savepoint descriptor. |