Package-level declarations

Types

Link copied to clipboard

Represents a SizedIterable that is empty and cannot be iterated over.

Link copied to clipboard
class Except(firstStatement: AbstractQuery<*>, val secondStatement: AbstractQuery<*>) : SetOperation

Represents an SQL operation that returns the distinct results of firstStatement that are not common to secondStatement.

Link copied to clipboard
class ExposedR2dbcException(cause: Throwable?, val contexts: List<StatementContext>, transaction: R2dbcTransaction) : R2dbcException

An exception that provides information about a database access error, within the contexts of the executed statements that caused the exception.

Link copied to clipboard
class Intersect(firstStatement: AbstractQuery<*>, val secondStatement: AbstractQuery<*>) : SetOperation

Represents an SQL operation that returns only the common rows from two query results, without any duplicates.

Link copied to clipboard
class LazySizedCollection<out T>(_delegate: SizedIterable<T>) : SizedIterable<T>

Represents a SizedIterable whose elements are only loaded on first access.

Link copied to clipboard

Represents the iterable elements of a database result, which are stored once loaded on first access.

Link copied to clipboard

Class representing an SQL SELECT statement on which query clauses can be built.

Link copied to clipboard

Class representing the underlying R2DBC database to which connections are made and on which transaction tasks are performed.

Link copied to clipboard
Link copied to clipboard
class R2dbcScope(dispatcher: CoroutineDispatcher?) : CoroutineScope

Class responsible for managing the scope of the underlying R2DBC database connection object.

Link copied to clipboard
Link copied to clipboard

Utility functions that assist with creating, altering, and dropping database schema objects.

Link copied to clipboard

Represents an SQL operation that combines the results of multiple queries into a single result.

Link copied to clipboard
class SizedCollection<out T>(val delegate: Collection<T>) : SizedIterable<T>

Represents a SizedIterable that defers to the specified delegate collection.

Link copied to clipboard
interface SizedIterable<out T> : Flow<T>

Represents the iterable elements of a database result.

Link copied to clipboard
class Union(firstStatement: AbstractQuery<*>, val secondStatement: AbstractQuery<*>) : SetOperation

Represents an SQL operation that combines all results from two queries, without any duplicates.

Link copied to clipboard
class UnionAll(firstStatement: AbstractQuery<*>, val secondStatement: AbstractQuery<*>) : SetOperation

Represents an SQL operation that combines all results from two queries, with duplicates included.

Properties

Link copied to clipboard
val ConnectionFactoryOptions.dialect: VendorDialect.DialectNameProvider
Link copied to clipboard
val ConnectionFactoryOptions.dialectName: String
Link copied to clipboard

Returns the name of the database obtained from its connection URL.

Link copied to clipboard
val ConnectionFactoryOptions.urlString: String

Functions

Link copied to clipboard

Adds one or more org.jetbrains.exposed.v1.sql.SqlLoggers to this transaction.

Link copied to clipboard

Mutate Query instance and add andPart to having condition with and operator.

Link copied to clipboard

Mutate Query instance and add andPart to where condition with and operator.

Link copied to clipboard
suspend fun <T : Table, E> T.batchInsert(    data: Iterable<E>,     ignore: Boolean = false,     shouldReturnGeneratedValues: Boolean = true,     body: BatchInsertStatement.(E) -> Unit): List<ResultRow>
suspend fun <T : Table, E> T.batchInsert(    data: Sequence<E>,     ignore: Boolean = false,     shouldReturnGeneratedValues: Boolean = true,     body: BatchInsertStatement.(E) -> Unit): List<ResultRow>

Represents the SQL statement that batch inserts new rows into a table.

Link copied to clipboard
suspend fun <T : Table, E : Any> T.batchReplace(    data: Iterable<E>,     shouldReturnGeneratedValues: Boolean = true,     body: BatchReplaceStatement.(E) -> Unit): List<ResultRow>
suspend fun <T : Table, E : Any> T.batchReplace(    data: Sequence<E>,     shouldReturnGeneratedValues: Boolean = true,     body: BatchReplaceStatement.(E) -> Unit): List<ResultRow>

Represents the SQL statement that either batch inserts new rows into a table, or, if insertions violate unique constraints, first deletes the existing rows before inserting new rows.

Link copied to clipboard
suspend fun <T : Table, E : Any> T.batchUpsert(    data: Iterable<E>,     vararg keys: Column<*>,     onUpdate: UpsertBuilder.(UpdateStatement) -> Unit? = null,     onUpdateExclude: List<Column<*>>? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null,     shouldReturnGeneratedValues: Boolean = true,     body: BatchUpsertStatement.(E) -> Unit): List<ResultRow>
suspend fun <T : Table, E : Any> T.batchUpsert(    data: Sequence<E>,     vararg keys: Column<*>,     onUpdate: UpsertBuilder.(UpdateStatement) -> Unit? = null,     onUpdateExclude: List<Column<*>>? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null,     shouldReturnGeneratedValues: Boolean = true,     body: BatchUpsertStatement.(E) -> Unit): List<ResultRow>

Represents the SQL statement that either batch inserts new rows into a table, or updates the existing rows if insertions violate unique constraints.

Link copied to clipboard
suspend fun Join.delete(targetTable: Table, vararg targetTables: Table, ignore: Boolean = false, limit: Int? = null): Int

Represents the SQL statement that deletes all rows from a table in a join relation.

suspend fun Join.delete(    targetTable: Table,     vararg targetTables: Table,     ignore: Boolean = false,     limit: Int? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>): Int

Represents the SQL statement that deletes rows from a table in a join relation.

@JvmName(name = "deleteJoinNullableParam")
suspend fun Join.delete(    targetTable: Table,     vararg targetTables: Table,     ignore: Boolean = false,     limit: Int? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null): Int
Link copied to clipboard
suspend fun Table.deleteAll(): Int

Represents the SQL statement that deletes all rows in a table.

Link copied to clipboard
suspend fun <T : Table> T.deleteIgnoreWhere(limit: Int? = null, op: T.(ISqlExpressionBuilder) -> Op<Boolean>): Int

Represents the SQL statement that deletes only rows in a table that match the provided op, while ignoring any possible errors that occur during the process.

Link copied to clipboard

Represents the SQL statement that deletes all rows in a table and returns specified data from the deleted rows.

fun <T : Table> T.deleteReturning(    returning: List<Expression<*>> = columns,     where: SqlExpressionBuilder.() -> Op<Boolean>): ReturningSuspendExecutable

Represents the SQL statement that deletes rows in a table and returns specified data from the deleted rows.

@JvmName(name = "deleteReturningNullableParam")
fun <T : Table> T.deleteReturning(    returning: List<Expression<*>> = columns,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null): ReturningSuspendExecutable
Link copied to clipboard
suspend fun <T : Table> T.deleteWhere(limit: Int? = null, op: T.(ISqlExpressionBuilder) -> Op<Boolean>): Int

Represents the SQL statement that deletes only rows in a table that match the provided op.

Link copied to clipboard
Link copied to clipboard

Returns only distinct results from this query that are NOT common to the results of other.

Link copied to clipboard
suspend fun Schema.exists(): Boolean

Checks if this schema exists or not.

suspend fun Sequence.exists(): Boolean

Returns whether this sequence exists in the database.

suspend fun Table.exists(): Boolean

Returns whether this table exists in the database.

Link copied to clipboard
fun R2dbcTransaction.explain(    analyze: Boolean = false,     options: String? = null,     body: IStatementBuilder.() -> Statement<*>): ExplainSuspendExecutable

Creates an ExplainQuery using the EXPLAIN keyword, which obtains information about a statement execution plan.

Link copied to clipboard
suspend fun <T : Table> T.insert(body: T.(UpdateBuilder<*>) -> Unit): InsertStatement<Number>

Represents the SQL statement that inserts a new row into a table.

suspend fun <T : Table> T.insert(selectQuery: AbstractQuery<*>, columns: List<Column<*>>? = null): InsertSelectStatement

Represents the SQL statement that uses data retrieved from a selectQuery to insert new rows into a table.

Link copied to clipboard
suspend fun <Key : Any, T : IdTable<Key>> T.insertAndGetId(body: T.(UpdateBuilder<*>) -> Unit): EntityID<Key>

Represents the SQL statement that inserts a new row into a table.

Link copied to clipboard
suspend fun <T : Table> T.insertIgnore(body: T.(UpdateBuilder<*>) -> Unit): InsertStatement<Long>

Represents the SQL statement that inserts a new row into a table, while ignoring any possible errors that occur during the process.

suspend fun <T : Table> T.insertIgnore(selectQuery: AbstractQuery<*>, columns: List<Column<*>>? = null): Int?

Represents the SQL statement that uses data retrieved from a selectQuery to insert new rows into a table, while ignoring any possible errors that occur during the process.

Link copied to clipboard
suspend fun <Key : Any, T : IdTable<Key>> T.insertIgnoreAndGetId(body: T.(UpdateBuilder<*>) -> Unit): EntityID<Key>?

Represents the SQL statement that inserts a new row into a table, while ignoring any possible errors that occur during the process.

Link copied to clipboard
fun <T : Table> T.insertReturning(    returning: List<Expression<*>> = columns,     ignoreErrors: Boolean = false,     body: T.(InsertStatement<Number>) -> Unit): ReturningSuspendExecutable

Represents the SQL statement that inserts new rows into a table and returns specified data from the inserted rows.

Link copied to clipboard

Returns only results from this query that are common to the results of other, WITHOUT including any duplicates.

Link copied to clipboard
infix fun <T, R> SizedIterable<T>.mapLazy(f: (T) -> R): SizedIterable<R>

Returns a SizedIterable containing the lazily evaluated results of applying the function f to each original element.

Link copied to clipboard
suspend fun <D : Table, S : Table> D.mergeFrom(source: S, body: MergeTableStatement.() -> Unit): MergeTableStatement
suspend fun <D : Table, S : Table> D.mergeFrom(    source: S,     on: SqlExpressionBuilder.() -> Op<Boolean>,     body: MergeTableStatement.() -> Unit): MergeTableStatement

Performs an SQL MERGE operation to insert, update, or delete records in the target table based on a comparison with a source table.

@JvmName(name = "mergeFromNullableParam")
suspend fun <D : Table, S : Table> D.mergeFrom(    source: S,     on: SqlExpressionBuilder.() -> Op<Boolean>? = null,     body: MergeTableStatement.() -> Unit): MergeTableStatement

suspend fun <T : Table> T.mergeFrom(    selectQuery: QueryAlias,     on: SqlExpressionBuilder.() -> Op<Boolean>,     body: MergeSelectStatement.() -> Unit): MergeSelectStatement

Performs an SQL MERGE operation to insert, update, or delete records in the target table based on a comparison with a select query source.

Link copied to clipboard

Mutate Query instance and add orPart to having condition with or operator.

Link copied to clipboard

Mutate Query instance and add orPart to where condition with or operator.

Link copied to clipboard
suspend fun <T : Table> T.replace(body: T.(UpdateBuilder<*>) -> Unit): ReplaceStatement<Long>

Represents the SQL statement that either inserts a new row into a table, or, if insertion would violate a unique constraint, first deletes the existing row before inserting a new row.

suspend fun <T : Table> T.replace(selectQuery: AbstractQuery<*>, columns: List<Column<*>>? = null): Int?

Represents the SQL statement that uses data retrieved from a selectQuery to either insert a new row into a table, or, if insertion would violate a unique constraint, first delete the existing row before inserting a new row.

Link copied to clipboard
fun ColumnSet.select(columns: List<Expression<*>>): Query

Creates a SELECT Query using a list of columns or expressions from this ColumnSet.

fun ColumnSet.select(column: Expression<*>, vararg columns: Expression<*>): Query

Creates a SELECT Query by selecting either a single column, or a subset of columns, from this org.jetbrains.exposed.v1.sql.ColumnSet.

Link copied to clipboard

Creates a SELECT Query by selecting all columns from this org.jetbrains.exposed.v1.sql.ColumnSet.

Link copied to clipboard
fun AbstractQuery<*>.union(other: Query): Union

Combines all results from this query with the results of other, WITHOUT including duplicates.

Link copied to clipboard

Combines all results from this query with the results of other, WITH duplicates included.

Link copied to clipboard
suspend fun <T : Table> T.update(limit: Int? = null, body: T.(UpdateStatement) -> Unit): Int

Represents the SQL statement that updates all rows of a table.

suspend fun Join.update(limit: Int? = null, body: (UpdateStatement) -> Unit): Int

Represents the SQL statement that updates all rows of a join relation.

suspend fun <T : Table> T.update(where: SqlExpressionBuilder.() -> Op<Boolean>, limit: Int? = null, body: T.(UpdateStatement) -> Unit): Int

Represents the SQL statement that updates rows of a table.

@JvmName(name = "updateNullableParam")
suspend fun <T : Table> T.update(where: SqlExpressionBuilder.() -> Op<Boolean>? = null, limit: Int? = null, body: T.(UpdateStatement) -> Unit): Int
@JvmName(name = "updateJoinNullableParam")
suspend fun Join.update(where: SqlExpressionBuilder.() -> Op<Boolean>? = null, limit: Int? = null, body: (UpdateStatement) -> Unit): Int

suspend fun Join.update(where: SqlExpressionBuilder.() -> Op<Boolean>, limit: Int? = null, body: (UpdateStatement) -> Unit): Int

Represents the SQL statement that updates rows of a join relation.

Link copied to clipboard
fun <T : Table> T.updateReturning(returning: List<Expression<*>> = columns, body: T.(UpdateStatement) -> Unit): ReturningSuspendExecutable

Represents the SQL statement that updates all rows of a table and returns specified data from the updated rows.

fun <T : Table> T.updateReturning(    returning: List<Expression<*>> = columns,     where: SqlExpressionBuilder.() -> Op<Boolean>,     body: T.(UpdateStatement) -> Unit): ReturningSuspendExecutable

Represents the SQL statement that updates rows of a table and returns specified data from the updated rows.

@JvmName(name = "updateReturningNullableParam")
fun <T : Table> T.updateReturning(    returning: List<Expression<*>> = columns,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null,     body: T.(UpdateStatement) -> Unit): ReturningSuspendExecutable
Link copied to clipboard
suspend fun <T : Table> T.upsert(    vararg keys: Column<*>,     onUpdate: UpsertBuilder.(UpdateStatement) -> Unit? = null,     onUpdateExclude: List<Column<*>>? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null,     body: T.(UpsertStatement<Long>) -> Unit): UpsertStatement<Long>

Represents the SQL statement that either inserts a new row into a table, or updates the existing row if insertion would violate a unique constraint.

Link copied to clipboard
fun <T : Table> T.upsertReturning(    vararg keys: Column<*>,     returning: List<Expression<*>> = columns,     onUpdate: UpsertBuilder.(UpdateStatement) -> Unit? = null,     onUpdateExclude: List<Column<*>>? = null,     where: SqlExpressionBuilder.() -> Op<Boolean>? = null,     body: T.(UpsertStatement<Long>) -> Unit): ReturningSuspendExecutable

Represents the SQL statement that either inserts a new row into a table, or updates the existing row if insertion would violate a unique constraint, and also returns specified data from the modified rows.