Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class NamedParameterQuery(npSqlQuery: String)

Used to parse sql string with named parameter. Parameter start with the character ':'.

Link copied to clipboard

A named parameter(s) version of CallableStatement

Link copied to clipboard

A named parameter(s) version of PreparedStatement

Link copied to clipboard
class NpSqlStringBuilder @JvmOverloads constructor(val connection: Connection, startingString: String = "")

A convenient class that helps with building dynamic raw sql query

Link copied to clipboard
abstract class NpStatement
Link copied to clipboard
Link copied to clipboard

An exception thrown on invalid mapping

Link copied to clipboard

Isolation level of a transaction

Functions

Link copied to clipboard
fun <T> Connection.executeTransaction(isolationLevel: TransactionIsolation = TransactionIsolation.TRANSACTION_SERIALIZABLE, executor: Connection.() -> T): T

A convenient function for wrapping executor function in a transaction. Will roll back transaction if any exception is thrown.

Link copied to clipboard

Create NpCallableStatement from a Connection and a SQL string with named parameter (for example ":foo", ":bar")

fun Connection.prepareNpCall(npSql: String, resultSetType: ResultSetType, resultSetConcurrency: ResultSetConcurrency): NpCallableStatement
fun Connection.prepareNpCall(npSql: String, resultSetType: ResultSetType, resultSetConcurrency: ResultSetConcurrency, resultSetHoldability: ResultSetHoldability): NpCallableStatement
Link copied to clipboard

Create NpPreparedStatement from a Connection and a SQL string with named parameter (for example ":foo", ":bar")

fun Connection.prepareNpStatement(npSql: String, resultSetType: ResultSetType, resultSetConcurrency: ResultSetConcurrency, resultSetHoldability: ResultSetHoldability): NpPreparedStatement