OctaviusTemplate

class OctaviusTemplate(dataSource: DataSource)

Runs a block on an OctaviusSession: the running transaction's where there is one, otherwise one over a connection borrowed for the call.

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

Runs action with the session as its receiver and returns what it returns.