Package-level declarations

An Exkt module providing handy utilities for Ktorm ORM.

Types

Link copied to clipboard
data class ExportedSequence<E : Entity<E>>(val limit: Int, val offset: Int, val totalCount: Int, val elements: List<E>)

Exported EntitySequence.

Link copied to clipboard
interface ModificationTimestampAware<E : Entity<E>> : Entity<E>
Link copied to clipboard
abstract class ModificationTimestampAwareEntities<E : ModificationTimestampAware<E>>(tableName: String, createdAtColumnName: String? = null, updatedAtColumnName: String? = null) : Table<E> , ModificationTimestampAwareEntitiesBase
Link copied to clipboard
interface UuidIdentified<E : Entity<E>> : Entity<E>
abstract class UuidIdentifiedAndModificationTimestampAwareEntities<E : UuidIdentifiedAndModificationTimestampAware<E>>(tableName: String, idColumnName: String? = null, createdAtColumnName: String? = null, updatedAtColumnName: String? = null) : Table<E> , UuidIdentifiedEntitiesBase, ModificationTimestampAwareEntitiesBase
Link copied to clipboard
abstract class UuidIdentifiedEntities<E : UuidIdentified<E>>(tableName: String, idColumnName: String? = null) : Table<E> , UuidIdentifiedEntitiesBase
Link copied to clipboard

Functions

Link copied to clipboard
fun <E : Entity<E>, T : Table<E>> EntitySequence<E, T>.export(limit: Int = DEFAULT_LIMIT, offset: Int = DEFAULT_OFFSET, sort: (T) -> OrderByExpression? = null): ExportedSequence<E>

Exports an EntitySequence.

Link copied to clipboard
fun <E : UuidIdentified<E>, T : UuidIdentifiedEntities<E>> Database.findByIdFrom(table: T, id: UUID): E?
fun <E : UuidIdentified<E>, T : UuidIdentifiedEntities<E>> Database.findByIdFrom(table: T, id: String): E?
Link copied to clipboard
inline fun <T> Entity<*>.lazyFetch(name: String, loader: () -> T): T
Link copied to clipboard
fun <E : ModificationTimestampAware<E>, T : ModificationTimestampAwareEntities<E>> EntitySequence<E, T>.sortedByCreatedAt(): EntitySequence<E, T>
Link copied to clipboard
Link copied to clipboard
fun <E : ModificationTimestampAware<E>, T : ModificationTimestampAwareEntities<E>> EntitySequence<E, T>.sortedByUpdatedAt(): EntitySequence<E, T>
Link copied to clipboard