Package-level declarations
Types
Link copied to clipboard
abstract class CrudRepository<ID : Comparable<ID>, E : Entity<ID>>(provider: DatabaseProvider) : Repository<ID, E>
Abstract repository that provides full CRUD operations on top of Repository.
Link copied to clipboard
Abstract builder class for constructing a DatabaseProvider.
Link copied to clipboard
data class DatabaseConfig(val driver: String, val url: String, val user: String = "", val password: String = "")
Data class representing the configuration for a database connection.
Link copied to clipboard
Marker annotation for Database DSL.
Link copied to clipboard
Interface for abstracting database access.
Link copied to clipboard
Applies pending migrations against the given provider.
Link copied to clipboard
Link copied to clipboard
Interface for DAO-based repositories.
Functions
Link copied to clipboard
suspend fun <T> dbQuerySuspend(database: Database? = null, statement: suspend Transaction.() -> T): T
Executes a transaction asynchronously using Kotlin coroutines.
Link copied to clipboard
Executes a statement for each table registered in the provider.
Link copied to clipboard
suspend fun <T : Table, R> T.querySuspend(provider: DatabaseProvider, statement: Transaction.(T) -> R): R
Extension function for Table to execute an asynchronous query within its context.
Link copied to clipboard
fun <T : Table, R> T.selectPage(provider: DatabaseProvider, offset: Long = 0, limit: Int = 20, where: () -> Op<Boolean>? = null, orderBy: List<Pair<Expression<*>, SortOrder>> = emptyList(), mapper: ResultRow.(T) -> R): PageResult<R>
Executes a paginated SELECT against this table inside a provider transaction.