Back to Exposed

Package-level declarations

docs/api/exposed-r2dbc/org.jetbrains.exposed.v1.r2dbc/index.html

1.2.047.7 KB
Original Source

Package-level declarations

TypesFunctionsProperties

Types

EmptySizedIterable

Link copied to clipboard

class EmptySizedIterable<out T> : SizedIterable<T>

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

Except

Link copied to clipboard

class Except(firstStatement: AbstractQuery<*>, secondStatement: AbstractQuery<*>) : SetOperation

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

ExplainSuspendExecutable

Link copied to clipboard

open class ExplainSuspendExecutable(val statement: ExplainQuery) : SuspendExecutable<ResultApi, ExplainQuery> , Flow<ExplainResultRow>

Represents the execution logic for an SQL statement that obtains information about a statement execution plan.

ExposedR2dbcException

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.

Intersect

Link copied to clipboard

class Intersect(firstStatement: AbstractQuery<*>, secondStatement: AbstractQuery<*>) : SetOperation

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

LazySizedCollection

Link copied to clipboard

class LazySizedCollection<out T>(_delegate: SizedIterable<T>) : SizedIterable<T>

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

LazySizedIterable

Link copied to clipboard

interface LazySizedIterable<T> : SizedIterable<T>

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

Query

Link copied to clipboard

open class Query(var set: FieldSet, where: Op<Boolean>?) : AbstractQuery<Query> , SuspendExecutable<ResultApi, Query> , SizedIterable<ResultRow>

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

R2dbcDatabase

Link copied to clipboard

class R2dbcDatabase : DatabaseApi

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

R2dbcDatabaseConfig

Link copied to clipboard

interface R2dbcDatabaseConfig : DatabaseConfig

A configuration for an R2dbcDatabase instance.

R2dbcTransaction

Link copied to clipboard

open class R2dbcTransaction(transactionImpl: R2dbcTransactionInterface) : Transaction, R2dbcTransactionInterface

Class representing a unit block of work that is performed on a database using an R2DBC driver.

SchemaUtils

Link copied to clipboard

object SchemaUtils : SchemaUtilityApi

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

SetOperation

Link copied to clipboard

sealed class SetOperation : AbstractQuery<SetOperation> , SuspendExecutable<ResultApi, SetOperation> , SizedIterable<ResultRow>

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

SizedCollection

Link copied to clipboard

class SizedCollection<out T>(val delegate: Collection<T>) : SizedIterable<T>

Represents a SizedIterable that defers to the specified delegate collection.

SizedIterable

Link copied to clipboard

interface SizedIterable<out T> : Flow<T>

Represents the iterable elements of a database result.

Union

Link copied to clipboard

class Union(firstStatement: AbstractQuery<*>, secondStatement: AbstractQuery<*>) : SetOperation

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

UnionAll

Link copied to clipboard

class UnionAll(firstStatement: AbstractQuery<*>, secondStatement: AbstractQuery<*>) : SetOperation

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

Properties

dialect

Link copied to clipboard

val ConnectionFactoryOptions.dialect: VendorDialect.DialectNameProvider

Returns the exact VendorDialect used by this ConnectionFactoryOptions state holder.

dialectName

Link copied to clipboard

val ConnectionFactoryOptions.dialectName: String

Returns the string VendorDialect name used by this ConnectionFactoryOptions state holder.

name

Link copied to clipboard

val R2dbcDatabase.name: String

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

urlString

Link copied to clipboard

val ConnectionFactoryOptions.urlString: String

Returns the constructed url connection string used by this ConnectionFactoryOptions state holder.

Functions

andHaving

Link copied to clipboard

fun Query.andHaving(andPart: () -> Op<Boolean>): Query

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

andWhere

Link copied to clipboard

fun Query.andWhere(andPart: () -> Op<Boolean>): Query

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

batchInsert

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.

batchReplace

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.

batchUpsert

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: () -> 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: () -> 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.

delete

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: () -> Op<Boolean>): Int

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

deleteAll

Link copied to clipboard

suspend fun Table.deleteAll(): Int

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

deleteIgnoreWhere

Link copied to clipboard

suspend fun <T : Table> T.deleteIgnoreWhere(limit: Int? = null, op: T.() -> 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.

deleteReturning

Link copied to clipboard

fun <T : Table> T.deleteReturning(returning: List<Expression<*>> = columns): ReturningSuspendExecutable

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: () -> Op<Boolean>): ReturningSuspendExecutable

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

deleteWhere

Link copied to clipboard

suspend fun <T : Table> T.deleteWhere(limit: Int? = null, op: T.() -> Op<Boolean>): Int

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

emptySized

Link copied to clipboard

fun <T> emptySized(): SizedIterable<T>

Returns an EmptySizedIterable.

except

Link copied to clipboard

fun AbstractQuery<*>.except(other: Query): Except

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

exists

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.

explain

Link copied to clipboard

fun R2dbcTransaction.explain(analyze: Boolean = false, options: String? = null, body: StatementBuilder.() -> Statement<*>): ExplainSuspendExecutable

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

insert

Link copied to clipboard

suspend fun <T : Table> T.insert(body: T.(InsertStatement<Number>) -> 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.

insertAndGetId

Link copied to clipboard

suspend fun <Key : Any, T : IdTable<Key>> T.insertAndGetId(body: T.(InsertStatement<EntityID<Key>>) -> Unit): EntityID<Key>

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

insertIgnore

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.

insertIgnoreAndGetId

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.

insertReturning

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.

intersect

Link copied to clipboard

fun AbstractQuery<*>.intersect(other: Query): Intersect

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

mapLazy

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.

mergeFrom

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: () -> 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.

suspend fun <T : Table> T.mergeFrom(selectQuery: QueryAlias, on: () -> 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.

orHaving

Link copied to clipboard

fun Query.orHaving(orPart: () -> Op<Boolean>): Query

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

orWhere

Link copied to clipboard

fun Query.orWhere(orPart: () -> Op<Boolean>): Query

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

replace

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.

select

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 ColumnSet.

selectAll

Link copied to clipboard

fun FieldSet.selectAll(): Query

Creates a SELECT Query by selecting all columns from this ColumnSet.

union

Link copied to clipboard

fun AbstractQuery<*>.union(other: Query): Union

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

unionAll

Link copied to clipboard

fun AbstractQuery<*>.unionAll(other: Query): UnionAll

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

update

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: () -> Op<Boolean>, limit: Int? = null, body: T.(UpdateStatement) -> Unit): Int

Represents the SQL statement that updates rows of a table.

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

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

updateReturning

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: () -> 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.

upsert

Link copied to clipboard

suspend fun <T : Table> T.upsert(vararg keys: Column<*>, onUpdate: UpsertBuilder.(UpdateStatement) -> Unit? = null, onUpdateExclude: List<Column<*>>? = null, where: () -> 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.

upsertReturning

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: () -> 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.

Generated by Dokka © 2026 Copyright