Package-level declarations

Functions

Link copied to clipboard
suspend fun <T : Table, E> DatabaseClient<*>.batchInsert(table: T, data: Iterable<E>, body: T.(InsertStatement<Number>, E) -> Unit)
Link copied to clipboard
suspend fun <T : Table, E> DatabaseClient<*>.batchInsertIgnore(table: T, data: Iterable<E>, body: T.(InsertStatement<Number>, E) -> Unit): Sequence<Boolean>
Link copied to clipboard
suspend fun DatabaseClient<*>.batchInsertSelect(statements: Iterable<InsertSelectStatement>): Sequence<Int>

This function is not conventional and it usages are likely to degrade performance.

Link copied to clipboard
suspend fun <T : Table, E> DatabaseClient<*>.batchSingleOrNoUpdate(table: T, data: Iterable<E>, where: BuildWhere? = null, limit: Int? = null, body: T.(UpdateStatement, E) -> Unit): Sequence<Boolean>
Link copied to clipboard
suspend fun <T : Table, E> DatabaseClient<*>.batchUpdate(table: T, data: Iterable<E>, where: BuildWhere? = null, limit: Int? = null, body: T.(UpdateStatement, E) -> Unit): Sequence<Int>
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.executeInsertIgnore(table: T, body: T.(InsertStatement<Number>) -> Unit): Boolean
Link copied to clipboard
suspend fun <T> DatabaseClient<*>.executeSingleColumnSelectQuery(columnSet: ColumnSet, column: Column<T>, buildQuery: FieldSet.() -> Query): RowSet<T>
inline suspend fun <T, R> DatabaseClient<*>.executeSingleColumnSelectQuery(columnSet: ColumnSet, column: Column<T>, buildQuery: FieldSet.() -> Query, crossinline mapper: T.() -> R): RowSet<R>
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insert(table: T, body: T.(InsertStatement<Number>) -> Unit)
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insertIgnore(table: T, body: T.(InsertStatement<Number>) -> Unit): Boolean
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insertIgnoreSelect(table: T, selectQuery: AbstractQuery<*>, columns: List<Column<*>> = table.defaultColumnsForInsertSelect()): Int
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insertIgnoreSingle(table: T, body: T.(InsertStatement<Number>) -> Unit): Boolean
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insertSelect(table: T, selectQuery: AbstractQuery<*>, columns: List<Column<*>> = table.defaultColumnsForInsertSelect()): Int
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.insertSingle(table: T, body: T.(InsertStatement<Number>) -> Unit)
Link copied to clipboard
inline suspend fun DatabaseClient<*>.select(columnSet: ColumnSet, buildQuery: ColumnSet.() -> Query): RowSet<ResultRow>
inline suspend fun <Data> DatabaseClient<*>.select(columnSet: ColumnSet, buildQuery: ColumnSet.() -> Query, crossinline resultRowMapper: ResultRow.() -> Data): RowSet<Data>
Link copied to clipboard
suspend fun <E> DatabaseClient<*>.selectBatch(fieldSet: FieldSet, buildQuery: FieldSet.(E) -> Query, data: Iterable<E>): Sequence<RowSet<ResultRow>>

This function may be very rarely used, as eq conditions can usually be combined into an inList select query.

Link copied to clipboard
inline suspend fun <T> DatabaseClient<*>.selectExpression(expression: Expression<T>): T

suspend fun <T : Any> DatabaseClient<*>.selectExpression(clazz: KClass<T>, expression: Expression<T?>): T?

SQL: SELECT <expression>;. Example: SELECT EXISTS(<query>).

Link copied to clipboard
suspend fun <T> DatabaseClient<*>.selectSingleColumn(columnSet: ColumnSet, column: Column<T>, buildQuery: FieldSet.() -> Query): RowSet<T>
inline suspend fun <ColumnT, DataT> DatabaseClient<*>.selectSingleColumn(columnSet: ColumnSet, column: Column<ColumnT>, buildQuery: FieldSet.() -> Query, crossinline mapper: ColumnT.() -> DataT): RowSet<DataT>
Link copied to clipboard
suspend fun <T : Comparable<T>> DatabaseClient<*>.selectSingleEntityIdColumn(columnSet: ColumnSet, column: Column<EntityID<T>>, buildQuery: FieldSet.() -> Query): RowSet<T>
Link copied to clipboard
suspend fun <T> DatabaseClient<*>.selectTableExpression(columnSet: ColumnSet, expression: Expression<T>, buildQuery: FieldSet.() -> Query): RowSet<T>

SQL: SELECT <expression> FROM <table>;. Examples: SELECT COUNT(*) FROM <table>;, SELECT SUM(<column>) FROM <table>;.

Link copied to clipboard
suspend fun <T : Table, E, SelectorResultT : Comparable<SelectorResultT>> DatabaseClient<*>.sortDataAndBatchUpdate(table: T, data: Iterable<E>, selector: (E) -> SelectorResultT, where: BuildWhere? = null, limit: Int? = null, body: T.(UpdateStatement, E) -> Unit): Sequence<Int>
Link copied to clipboard
suspend fun <T : Table> DatabaseClient<*>.update(table: T, where: BuildWhere? = null, limit: Int? = null, body: T.(UpdateStatement) -> Unit): Int