Package org.jdbi.v3.core.kotlin

Types

KotlinMapper
Link copied to clipboard
class KotlinMapper(kClass: KClass<*>, prefix: String) : RowMapper<Any>
KotlinMapperFactory
Link copied to clipboard
class KotlinMapperFactory : RowMapperFactory

This {@link RowMapperFactory} creates a new, generic {@link KotlinMapper} for every data class used. By installing this factory, any Kotlin data class will have an automatic, implicit row mapper.

KotlinPlugin
Link copied to clipboard
class KotlinPlugin(installKotlinMapperFactory: Boolean) : JdbiPlugin

Installs Kotlin specific functionality.

Functions

bindKotlin
Link copied to clipboard
@Beta
fun <This : SqlStatement<This>> SqlStatement<This>.bindKotlin(obj: Any): This
@Beta
fun <This : SqlStatement<This>> SqlStatement<This>.bindKotlin(name: String, obj: Any): This
getQualifiers
Link copied to clipboard
fun getQualifiers(vararg elements: KAnnotatedElement?): Set<Annotation>

Returns the set of qualifying annotations on the given Kotlin elements.

inTransactionUnchecked
Link copied to clipboard
inline fun <R> Jdbi.inTransactionUnchecked(crossinline block: (Handle) -> R): R
inline fun <R> Jdbi.inTransactionUnchecked(level: TransactionIsolationLevel, crossinline block: (Handle) -> R): R

Temporary extension function for Jdbi.inTransaction.

isKotlinClass
Link copied to clipboard
fun Class<*>.isKotlinClass(): Boolean
mapTo
Link copied to clipboard
inline fun <T : Any> ResultBearing.mapTo(): ResultIterable<T>
useExtension
Link copied to clipboard
fun <E : Any, X : Exception> Jdbi.useExtension(extensionType: KClass<E>, callback: ExtensionConsumer<E, X>)

A convenience method which opens an extension of the given type, and yields it to a callback. A handle is opened if needed by the extention, and closed before returning to the caller.

useExtensionUnchecked
Link copied to clipboard
inline fun <E> Jdbi.useExtensionUnchecked(extensionType: Class<E>, crossinline callback: (E) -> Unit)
inline fun <E : Any> Jdbi.useExtensionUnchecked(extensionType: KClass<E>, crossinline callback: (E) -> Unit)

Temporary extension function for Jdbi.useExtension.

useHandleUnchecked
Link copied to clipboard
inline fun Jdbi.useHandleUnchecked(crossinline block: (Handle) -> Unit)

Temporary extension function for Jdbi.useHandle.

useSequence
Link copied to clipboard
inline fun <O : Any> ResultIterable<O>.useSequence(block: (Sequence<O>) -> Unit)
useTransactionUnchecked
Link copied to clipboard
inline fun Jdbi.useTransactionUnchecked(crossinline block: (Handle) -> Unit)
inline fun Jdbi.useTransactionUnchecked(level: TransactionIsolationLevel, crossinline block: (Handle) -> Unit)

Temporary extension function for Jdbi.useTransaction.

withExtension
Link copied to clipboard
fun <E : Any, R, X : Exception> Jdbi.withExtension(extensionType: KClass<E>, callback: ExtensionCallback<R, E, X>): R

A convenience method which opens an extension of the given type, yields it to a callback, and returns the result of the callback. A handle is opened if needed by the extension, and closed before returning to the caller.

withExtensionUnchecked
Link copied to clipboard
inline fun <E, R> Jdbi.withExtensionUnchecked(extensionType: Class<E>, crossinline callback: (E) -> R): R
inline fun <E : Any, R> Jdbi.withExtensionUnchecked(extensionType: KClass<E>, crossinline callback: (E) -> R): R

Temporary extension function for Jdbi.withExtension.

withHandleUnchecked
Link copied to clipboard
inline fun <R> Jdbi.withHandleUnchecked(crossinline block: (Handle) -> R): R

Temporary extension function for Jdbi.withHandle.