OctaviusTemplate

class OctaviusTemplate(dataSource: DataSource)

Template class that simplifies executing Octavius operations and provides proper integration with Spring's transaction management.

Failures leave it as they leave a session used directly: as the driver's own exceptions, with nothing of Spring's around them.

Constructors

Link copied to clipboard
constructor(dataSource: DataSource)

Functions

Link copied to clipboard
fun <T> execute(action: OctaviusSessionOperations.() -> T): T

Executes the given action within an OctaviusSession. The session is passed as the receiver of action, so its operations are available directly. Connection management and transaction synchronization are handled automatically.