# Package-level declarations

## Types

AbstractQuery
Link copied to clipboard
abstract class AbstractQuery<T : AbstractQuery<T>>(targets: List<Table>) : Statement<ResultApi>

Base class representing an SQL query that returns a database result when executed.

Alias
Link copied to clipboard
class Alias<out T : Table>(val delegate: T, val alias: String) : Table

Represents a temporary SQL identifier, alias, for a delegate table.

AndBitOp
Link copied to clipboard
class AndBitOp<T, S : T>(val expr1: Expression<T>, val expr2: Expression<S>, val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T>

Represents an SQL operator that performs a bitwise `and` on expr1 and expr2.

AndOp
Link copied to clipboard
class AndOp(expressions: List<Expression<Boolean>>) : CompoundBooleanOp

Represents a logical operator that performs an `and` operation between all the specified expressions.

ArrayColumnType
Link copied to clipboard
class ArrayColumnType<T, R : List<Any?>>(val delegate: IColumnType<T & Any>, val maximumCardinality: List<Int>? = null, val dimensions: Int = 1) : ColumnType<R>

Multi-dimensional array column type for storing a collection of nested elements.

AutoIncColumnType
Link copied to clipboard
class AutoIncColumnType<T>(val delegate: ColumnType<T>, _autoincSeq: String?, fallbackSeqName: String) : IColumnType<T>

Auto-increment column type.

Avg
Link copied to clipboard
class Avg<T : Comparable<T>, S : T?>(val expr: Expression<S>, scale: Int) : Function<BigDecimal?> , WindowFunction<BigDecimal?>

Represents an SQL function that returns the average (arithmetic mean) of all non-null input values, or `null` if there are no non-null values.

BaseCaseWhen
Link copied to clipboard
abstract class BaseCaseWhen<T> : ExpressionWithColumnType<T> , ComplexExpression

Base abstract class for SQL CASE expressions that provide conditional logic in queries.

BasicBinaryColumnType
Link copied to clipboard
open class BasicBinaryColumnType : ColumnType<ByteArray>

Binary column for storing binary strings of variable and unlimited length.

BasicUuidColumnType
Link copied to clipboard
abstract class BasicUuidColumnType<T> : ColumnType<T>

Base binary column for storing types of universally unique identifiers (UUID) as a 128-bit value.

BasicVectorColumnType
Link copied to clipboard
abstract class BasicVectorColumnType<T>(val dimensions: Int?, val format: VectorFormat) : ColumnType<T>

Base column for storing vector values in various dimension formats.

Between
Link copied to clipboard
class Between(val expr: Expression<*>, val from: Expression<*>, val to: Expression<*>) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if the specified expr is between the values from and to.

BiCompositeColumn
Link copied to clipboard
abstract class BiCompositeColumn<C1, C2, T>(column1: Column<C1>, column2: Column<C2>, val transformFromValue: (T) -> Pair<C1?, C2?>, val transformToValue: (Any?, Any?) -> T, nullable: Boolean = false) : CompositeColumn<T>

Extension of CompositeColumn that consists of two columns, column1 and column2.

BinaryColumnType
Link copied to clipboard
open class BinaryColumnType(val length: Int) : BasicBinaryColumnType

Binary column for storing binary strings of a specific length.

BlobColumnType
Link copied to clipboard
class BlobColumnType(val useObjectIdentifier: Boolean = false) : ColumnType<ExposedBlob>

Binary column for storing BLOBs.

BooleanColumnType
Link copied to clipboard
class BooleanColumnType : ColumnType<Boolean>

Boolean column for storing boolean values.

ByteColumnType
Link copied to clipboard
class ByteColumnType : ColumnType<Byte>

Numeric column for storing 1-byte integers.

Case
Link copied to clipboard
class Case

Builder class for creating conditional CASE expressions where each WHEN clause contains an independent boolean condition.

CaseWhen
Link copied to clipboard
class CaseWhen<T> : BaseCaseWhen<T?>

Represents a conditional CASE expression that can be extended with additional WHEN clauses or completed with an ELSE clause.

CaseWhenElse
Link copied to clipboard
class CaseWhenElse<T>(val cases: List<Pair<Expression<*>, Expression<out T>>>, val elseResult: Expression<T>) : BaseCaseWhen<T>

Represents a completed conditional CASE expression with an ELSE clause. Steps through conditions and returns a value when the first condition is met, or returns the ELSE result if all conditions are false.

Cast
Link copied to clipboard
class Cast<T>(val expr: Expression<*>, columnType: IColumnType<T & Any>) : Function<T>

Represents an SQL function that specifies a conversion from one data type to another.

CastToJson
Link copied to clipboard
class CastToJson<T>(val expression: Expression<*>, columnType: IColumnType<T & Any>) : Function<T>

Represents an SQL function that specifies a casting from one data type to the JSON type, if supported.

CharacterColumnType
Link copied to clipboard
class CharacterColumnType : ColumnType<Char>

Character column for storing single characters.

CharColumnType
Link copied to clipboard
open class CharColumnType(val colLength: Int = 255, collate: String? = null) : StringColumnType

Character column for storing strings with the exact colLength length using the specified collate type.

CharLength
Link copied to clipboard
class CharLength<T : String?>(val expr: Expression<T>) : Function<Int?>

Represents an SQL function that returns the length of expr, measured in characters, or `null` if expr is null.

CheckConstraint
Link copied to clipboard
data class CheckConstraint(val tableName: String, val checkName: String, val checkOp: String) : DdlAware

Represents a check constraint.

Coalesce
Link copied to clipboard
class Coalesce<T, S : T?>(expr: ExpressionWithColumnType<S>, alternate: Expression<out T>, others: Expression<out T>) : Function<T>

Represents an SQL function that returns the first of its arguments that is not null.

Column
Link copied to clipboard
class Column<T>(val table: Table, val name: String, val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T> , DdlAware, Comparable<Column<*>>

Represents a column.

ColumnDiff
Link copied to clipboard
data class ColumnDiff(val nullability: Boolean, val type: Boolean, val autoInc: Boolean, val defaults: Boolean, val caseSensitiveName: Boolean, val sizeAndScale: Boolean, val comment: Boolean = false)

Represents differences between a column definition and database metadata for the existing column.

ColumnSet
Link copied to clipboard
abstract class ColumnSet : FieldSet

Represents a set of columns.

ColumnTransformer
Link copied to clipboard
interface ColumnTransformer<Unwrapped, Wrapped>

An interface defining the transformation between a source column type and a target type.

ColumnType
Link copied to clipboard
abstract class ColumnType<T>(var nullable: Boolean = false) : IColumnType<T>

Standard column type.

ColumnWithTransform
Link copied to clipboard
open class ColumnWithTransform<Unwrapped, Wrapped>(val delegate: IColumnType<Unwrapped & Any>, val transformer: ColumnTransformer<Unwrapped, Wrapped>) : ColumnType<Wrapped & Any>

A class that handles the transformation between a source column type and a target type.

ComparisonOp
Link copied to clipboard
abstract class ComparisonOp(val expr1: Expression<*>, val expr2: Expression<*>, val opSign: String) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents a comparison between expr1 and expr2 using the given SQL opSign.

ComplexExpression
Link copied to clipboard
interface ComplexExpression

Marker interface which indicates that expression should be wrapped with braces when used in compound operators

CompositeColumn
Link copied to clipboard
abstract class CompositeColumn<T> : Expression<T>

Composite column represents multiple tightly related standard columns, which behave like a single column for the user

CompositeSqlLogger
Link copied to clipboard
class CompositeSqlLogger : SqlLogger, StatementInterceptor

Class representing one or more SqlLoggers.

CompoundBooleanOp
Link copied to clipboard
sealed class CompoundBooleanOp : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represent a logical operator that performs an operation between all the specified expressions. This is the base class for the `and` and `or` operators:

Concat
Link copied to clipboard
class Concat(val separator: String, val expr: Expression<*>) : Function<String>

Represents an SQL function that concatenates the text representations of all non-null input values from expr, separated by separator.

Count
Link copied to clipboard
class Count(val expr: Expression<*>, val distinct: Boolean = false) : Function<Long> , WindowFunction<Long>

Represents an SQL function that returns the number of input rows for which the value of expr is not null.

CumeDist
Link copied to clipboard
class CumeDist(scale: Int = 2) : WindowFunction<BigDecimal>

Represents an SQL function that Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/N to 1. scale represents decimal digits count in the fractional part of result.

CurrentOrFollowing
Link copied to clipboard
interface CurrentOrFollowing : WindowFrameBound

Represents an SQL window function frame bound that is CURRENT ROW or one of FOLLOWING forms.

CurrentOrPreceding
Link copied to clipboard
interface CurrentOrPreceding : WindowFrameBound

Represents an SQL window function frame bound that is CURRENT ROW or one of PRECEDING forms.

CurrentRowWindowFrameBound
Link copied to clipboard
object CurrentRowWindowFrameBound : WindowFrameBound, CurrentOrPreceding, CurrentOrFollowing

Represents an CURRENT ROW window function frame bound.

CustomEnumerationColumnType
Link copied to clipboard
class CustomEnumerationColumnType<T : Enum<T>>(val name: String, val sql: String?, val fromDb: (Any) -> T, val toDb: (T) -> Any) : ColumnType<T>

Enumeration column for storing enums of type T using the custom SQL type sql.

CustomFunction
Link copied to clipboard
open class CustomFunction<T>(val functionName: String, columnType: IColumnType<T & Any>, val expr: Expression<*>) : Function<T>

Represents a custom SQL function.

CustomOperator
Link copied to clipboard
open class CustomOperator<T>(val operatorName: String, columnType: IColumnType<T & Any>, val expr1: Expression<*>, val expr2: Expression<*>) : Function<T>

Represents a custom SQL binary operator.

DatabaseApi
Link copied to clipboard
abstract class DatabaseApi

Base class representing the underlying database to which connections are made and on which transaction tasks are performed.

DatabaseConfig
Link copied to clipboard
interface DatabaseConfig

Base configuration for a DatabaseApi instance.

DdlAware
Link copied to clipboard
interface DdlAware

Common interface for database objects that can be created, modified and dropped.

DecimalColumnType
Link copied to clipboard
class DecimalColumnType(val precision: Int, val scale: Int) : ColumnType<BigDecimal>

Numeric column for storing numbers with the specified precision and scale.

DenseRank
Link copied to clipboard
class DenseRank : WindowFunction<Long>

Represents an SQL function that returns the rank of the current row, without gaps; this function effectively counts peer groups.

DivideOp
Link copied to clipboard
class DivideOp<T, S : T>(dividend: Expression<T>, divisor: Expression<S>, columnType: IColumnType<T & Any>) : CustomOperator<T>

Represents an SQL operator that divides expr1 by expr2.

DoubleColumnType
Link copied to clipboard
class DoubleColumnType : ColumnType<Double>

Numeric column for storing 8-byte (double precision) floating-point numbers.

EntityIDColumnType
Link copied to clipboard
class EntityIDColumnType<T : Any>(val idColumn: Column<T>) : ColumnType<EntityID<T>>

Identity column type for storing unique EntityID values.

EnumerationColumnType
Link copied to clipboard
class EnumerationColumnType<T : Enum<T>>(val klass: KClass<T>) : ColumnType<T>

Enumeration column for storing enums of type klass by their ordinal.

EnumerationNameColumnType
Link copied to clipboard
class EnumerationNameColumnType<T : Enum<T>>(val klass: KClass<T>, val colLength: Int) : ColumnType<T>

Enumeration column for storing enums of type klass by their name.

EqOp
Link copied to clipboard
class EqOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is equals to expr2.

EqSubQueryOp
Link copied to clipboard
class EqSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is equals to single value returned from query.

Exists
Link copied to clipboard
class Exists(val query: AbstractQuery<*>) : Op<Boolean> , Op.OpBoolean

Represents an SQL operator that checks if query returns at least one row.

ExperimentalDatabaseMigrationApi
Link copied to clipboard
@RequiresOptIn(message = "This database migration API is experimental. Its usage must be marked with '@OptIn(org.jetbrains.exposed.v1.sql.ExperimentalDatabaseMigrationApi::class)' or '@org.jetbrains.exposed.v1.sql.ExperimentalDatabaseMigrationApi'.")
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ExperimentalDatabaseMigrationApi

API marked with this annotation is experimental. Any behavior associated with its use is not guaranteed to be stable.

ExperimentalKeywordApi
Link copied to clipboard
@RequiresOptIn(message = "This API is experimental and the behavior defined by setting this value to 'true' is now the default. Its usage must be marked with '@OptIn(org.jetbrains.exposed.v1.sql.ExperimentalKeywordApi::class)' or '@org.jetbrains.exposed.v1.sql.ExperimentalKeywordApi'.")
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ExperimentalKeywordApi

API marked with this annotation is experimental. Any behavior associated with its use is not guaranteed to be stable.

ExplainQuery
Link copied to clipboard
open class ExplainQuery(val analyze: Boolean, val options: String?, internalStatement: Statement<*>) : Statement<ResultApi>

Represents the SQL query that obtains information about a statement execution plan.

ExplainResultRow
Link copied to clipboard
class ExplainResultRow(val fieldIndex: Map<String, Int>, data: Array<Any?>)

A row of data representing a single record retrieved from a database result set about a statement execution plan.

Expression
Link copied to clipboard
abstract class Expression<T>

Represents an SQL expression of type T.

ExpressionAlias
Link copied to clipboard
class ExpressionAlias<T>(val delegate: Expression<T>, val alias: String) : Expression<T> , IExpressionAlias<T>

Represents a temporary SQL identifier, alias, for a delegate expression.

ExpressionWithColumnType
Link copied to clipboard
abstract class ExpressionWithColumnType<T> : Expression<T>

Represents an SQL expression of type T, but with a specific column type.

ExpressionWithColumnTypeAlias
Link copied to clipboard
class ExpressionWithColumnTypeAlias<T>(val delegate: ExpressionWithColumnType<T>, val alias: String) : ExpressionWithColumnType<T> , IExpressionAlias<T>

Represents a temporary SQL identifier, alias, for a delegate expression with column type.

FieldSet
Link copied to clipboard
interface FieldSet

Represents a set of expressions, contained in the given column set.

FilterCondition
Link copied to clipboard
typealias FilterCondition = () -> Op<Boolean>?

A conditional expression used as a filter when creating a partial index.

FirstValue
Link copied to clipboard
class FirstValue<T>(val expr: ExpressionWithColumnType<T>) : WindowFunction<T>

Represents an SQL function that returns expr evaluated at the row that is the first row of the window frame.

FloatColumnType
Link copied to clipboard
class FloatColumnType : ColumnType<Float>

Numeric column for storing 4-byte (single precision) floating-point numbers.

FloatVectorColumnType
Link copied to clipboard
class FloatVectorColumnType(dimensions: Int?, format: VectorFormat) : BasicVectorColumnType<FloatArray>

Column for storing vector values as a `FloatArray`.

ForeignKeyConstraint
Link copied to clipboard
data class ForeignKeyConstraint(val references: Map<Column<*>, Column<*>>, onUpdate: ReferenceOption?, onDelete: ReferenceOption?, name: String?) : DdlAware

Represents a foreign key constraint.

Function
Link copied to clipboard
abstract class Function<T>(val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T>

Represents an SQL function.

GreaterEqOp
Link copied to clipboard
class GreaterEqOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is greater than or equal to expr2.

GreaterEqSubQueryOp
Link copied to clipboard
class GreaterEqSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is greater than or equal to the single value returned from query.

GreaterOp
Link copied to clipboard
class GreaterOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is greater than expr2.

GreaterSubQueryOp
Link copied to clipboard
class GreaterSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is greater than the single value returned from query.

GroupConcat
Link copied to clipboard
class GroupConcat<T : String?>(val expr: Expression<T>, val separator: String?, val distinct: Boolean, val orderBy: Pair<Expression<*>, SortOrder>) : Function<String>

Represents an SQL function that concatenates the text representation of all non-null input values of each group from expr, separated by separator

IColumnType
Link copied to clipboard
interface IColumnType<T>

Interface common to all column types.

IDateColumnType
Link copied to clipboard
interface IDateColumnType

Marker interface for date/datetime related column types.

IExpressionAlias
Link copied to clipboard
interface IExpressionAlias<T>

Interface common to all Expressions with temporary SQL identifiers.

Index
Link copied to clipboard
data class Index(val columns: List<Column<*>>, val unique: Boolean, val customName: String? = null, val indexType: String? = null, val filterCondition: Op<Boolean>? = null, val functions: List<ExpressionWithColumnType<*>>? = null, val functionsTable: Table? = null) : DdlAware

Represents an index.

InSubQueryOp
Link copied to clipboard
class InSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is equals to any row returned from query.

IntegerColumnType
Link copied to clipboard
class IntegerColumnType : ColumnType<Int>

Numeric column for storing 4-byte integers.

InternalApi
Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.ERROR, message = "This API is internal in Exposed and should not be used. It may be changed or removed in the future without notice.")
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS])
annotation class InternalApi

API marked with this annotation is internal and should not be used outside Exposed. It may be changed or removed in the future without notice. Using it outside Exposed may result in undefined and unexpected behaviour.

IntVectorColumnType
Link copied to clipboard
class IntVectorColumnType(dimensions: Int?, format: VectorFormat) : BasicVectorColumnType<IntArray>

Column for storing vector values as an `IntArray`.

IsDistinctFromOp
Link copied to clipboard
class IsDistinctFromOp(val expression1: Expression<*>, val expression2: Expression<*>) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if expression1 is not equal to expression2, with `null` treated as a comparable value. This comparison never returns null.

IsNotDistinctFromOp
Link copied to clipboard
class IsNotDistinctFromOp(val expression1: Expression<*>, val expression2: Expression<*>) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if expression1 is equal to expression2, with `null` treated as a comparable value. This comparison never returns null.

IsNotNullOp
Link copied to clipboard
class IsNotNullOp(val expr: Expression<*>) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if the specified expr is not null.

IsNullOp
Link copied to clipboard
class IsNullOp(val expr: Expression<*>) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if the specified expr is null.

ISqlExpressionBuilder
Link copied to clipboard
interface ISqlExpressionBuilder
Join
Link copied to clipboard
class Join(val table: ColumnSet) : ColumnSet

Represents a join relation between multiple column sets.

JoinCondition
Link copied to clipboard
typealias JoinCondition = Pair<Expression<*>, Expression<*>>

Pair of expressions used to match rows from two joined tables.

JoinType
Link copied to clipboard
enum JoinType : Enum<JoinType>

Represents column set join types.

JsonColumnMarker
Link copied to clipboard
interface JsonColumnMarker

Marker interface for json/jsonb related column types.

Key
Link copied to clipboard
class Key<T>

Represents a key for a value of type T.

Lag
Link copied to clipboard
class Lag<T>(val expr: ExpressionWithColumnType<T>, val offset: ExpressionWithColumnType<Int> = intLiteral(1), val defaultValue: ExpressionWithColumnType<T>? = null) : WindowFunction<T?>

Represents an SQL function that returns value evaluated at the row that is offset rows before the current row within the partition; if there is no such row, instead returns defaultValue.

LargeTextColumnType
Link copied to clipboard
open class LargeTextColumnType(collate: String? = null, eagerLoading: Boolean = false) : TextColumnType
LastValue
Link copied to clipboard
class LastValue<T>(val expr: ExpressionWithColumnType<T>) : WindowFunction<T>

Represents an SQL function that returns expr evaluated at the row that is the last row of the window frame.

Lead
Link copied to clipboard
class Lead<T>(val expr: ExpressionWithColumnType<T>, val offset: ExpressionWithColumnType<Int> = intLiteral(1), val defaultValue: ExpressionWithColumnType<T>? = null) : WindowFunction<T?>

Represents an SQL function that returns value evaluated at the row that is offset rows after the current row within the partition; if there is no such row, instead returns defaultValue.

LessEqOp
Link copied to clipboard
class LessEqOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is less than or equal to expr2.

LessEqSubQueryOp
Link copied to clipboard
class LessEqSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is less than or equal to the single value returned from query.

LessOp
Link copied to clipboard
class LessOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is less than expr2.

LessSubQueryOp
Link copied to clipboard
class LessSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is less than the single value returned from query.

LikeEscapeOp
Link copied to clipboard
class LikeEscapeOp(expr1: Expression<*>, expr2: Expression<*>, like: Boolean, val escapeChar: Char?) : ComparisonOp

Represents an SQL operator that checks if expr1 matches expr2.

LikePattern
Link copied to clipboard
data class LikePattern(val pattern: String, val escapeChar: Char? = null)

Represents a pattern used for the comparison of string expressions.

LiteralOp
Link copied to clipboard
class LiteralOp<T>(val columnType: IColumnType<T & Any>, val value: T) : ExpressionWithColumnType<T>

Represents the specified value as an SQL literal, using the specified columnType to convert the value.

Locate
Link copied to clipboard
class Locate<T : String?>(val expr: Expression<T>, val substring: String) : Function<Int>

Represents an SQL function that returns the index of the first occurrence of substring in expr or 0

LongColumnType
Link copied to clipboard
class LongColumnType : ColumnType<Long>

Numeric column for storing 8-byte integers.

LowerCase
Link copied to clipboard
class LowerCase<T : String?>(val expr: Expression<T>) : Function<String>

Represents an SQL function that converts expr to lower case.

Max
Link copied to clipboard
class Max<T : Any, in S : T?>(val expr: Expression<in S>, columnType: IColumnType<T>) : Function<T?> , WindowFunction<T?>

Represents an SQL function that returns the maximum value of expr across all non-null input values, or `null` if there are no non-null values.

MediumTextColumnType
Link copied to clipboard
open class MediumTextColumnType(collate: String? = null, eagerLoading: Boolean = false) : TextColumnType
Min
Link copied to clipboard
class Min<T : Any, in S : T?>(val expr: Expression<in S>, columnType: IColumnType<T>) : Function<T?> , WindowFunction<T?>

Represents an SQL function that returns the minimum value of expr across all non-null input values, or `null` if there are no non-null values.

MinusOp
Link copied to clipboard
class MinusOp<T, S : T>(expr1: Expression<T>, expr2: Expression<S>, columnType: IColumnType<T & Any>) : CustomOperator<T>

Represents an SQL operator that subtracts expr2 from expr1.

ModOp
Link copied to clipboard
class ModOp<T : Number?, S : Number?, R : Number?>(val expr1: Expression<T>, val expr2: Expression<S>, val columnType: IColumnType<R & Any>) : ExpressionWithColumnType<R>

Represents an SQL operator that calculates the remainder of dividing expr1 by expr2.

NeqOp
Link copied to clipboard
class NeqOp(expr1: Expression<*>, expr2: Expression<*>) : ComparisonOp

Represents an SQL operator that checks if expr1 is not equals to expr2.

NextVal
Link copied to clipboard
sealed class NextVal<T> : Function<T>

Represents an SQL function that advances the specified seq and returns the new value.

NoOpConversion
Link copied to clipboard
class NoOpConversion<T, S>(val expr: Expression<T>, val columnType: IColumnType<S & Any>) : ExpressionWithColumnType<S>

Represents an SQL operator that doesn't perform any operation. This is mainly used to change between column types.

NotEqSubQueryOp
Link copied to clipboard
class NotEqSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is not equals to single value returned from query.

NotExists
Link copied to clipboard
class NotExists(val query: AbstractQuery<*>) : Op<Boolean> , Op.OpBoolean

Represents an SQL operator that checks if query doesn't returns any row.

NotInSubQueryOp
Link copied to clipboard
class NotInSubQueryOp<T>(expr: Expression<T>, query: AbstractQuery<*>) : SubQueryOp<T>

Represents an SQL operator that checks if expr is not equals to any row returned from query.

NotOp
Link copied to clipboard
class NotOp<T>(val expr: Expression<T>) : Op<Boolean> , Op.OpBoolean

Represents a logical operator that inverts the specified boolean expr.

NthValue
Link copied to clipboard
class NthValue<T>(val expr: ExpressionWithColumnType<T>, val n: ExpressionWithColumnType<Int>) : WindowFunction<T?>

Represents an SQL function that returns expr evaluated at the row that is the n'th row of the window frame (counting from 1); null if no such row

Ntile
Link copied to clipboard
class Ntile(val numBuckets: ExpressionWithColumnType<Int>) : WindowFunction<Int>

Returns an integer ranging from 1 to the argument value, dividing the partition as equally as possible.

NullableColumnWithTransform
Link copied to clipboard
open class NullableColumnWithTransform<Unwrapped, Wrapped>(delegate: IColumnType<Unwrapped & Any>, transformer: ColumnTransformer<Unwrapped, Wrapped>) : ColumnWithTransform<Unwrapped, Wrapped>

A class that handles the transformation between a source column type and a target type, but also supports transformations involving `null` values.

OffsetFollowingWindowFrameBound
Link copied to clipboard
class OffsetFollowingWindowFrameBound(offset: Expression<Int>) : OffsetWindowFrameBound, CurrentOrFollowing

Represents offset FOLLOWING window function frame bound.

OffsetPrecedingWindowFrameBound
Link copied to clipboard
class OffsetPrecedingWindowFrameBound(offset: Expression<Int>) : OffsetWindowFrameBound, CurrentOrPreceding

Represents offset PRECEDING window function frame bound.

OffsetWindowFrameBound
Link copied to clipboard
open class OffsetWindowFrameBound(offset: Expression<Int>, direction: WindowFrameBoundDirection) : WindowFrameBound

Represents an offset PRECEDING or FOLLOWING window function frame bound. direction specifies whether previous or next partition rows will be used.

Op
Link copied to clipboard
abstract class Op<T> : Expression<T>

Represents an SQL operator.

OrBitOp
Link copied to clipboard
class OrBitOp<T, S : T>(val expr1: Expression<T>, val expr2: Expression<S>, val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T>

Represents an SQL operator that performs a bitwise `or` on expr1 and expr2.

OrOp
Link copied to clipboard
class OrOp(expressions: List<Expression<Boolean>>) : CompoundBooleanOp

Represents a logical operator that performs an `or` operation between all the specified expressions.

PercentRank
Link copied to clipboard
class PercentRank(scale: Int = 2) : WindowFunction<BigDecimal>

Represents an SQL function that returns the relative rank of the current row, that is (rank - 1) / (total partition rows - 1). The value thus ranges from 0 to 1 inclusive. scale represents decimal digits count in the fractional part of result.

PlusOp
Link copied to clipboard
class PlusOp<T, S : T>(expr1: Expression<T>, expr2: Expression<S>, columnType: IColumnType<T & Any>) : CustomOperator<T>

Represents an SQL operator that adds expr2 to expr1.

QueryAlias
Link copied to clipboard
class QueryAlias(val query: AbstractQuery<*>, val alias: String) : ColumnSet

Represents a temporary SQL identifier, alias, for a query.

QueryBuilder
Link copied to clipboard
class QueryBuilder(val prepared: Boolean)

An object to which SQL expressions and values can be appended.

QueryParameter
Link copied to clipboard
class QueryParameter<T>(val value: T, val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T>

Represents the specified value as a query parameter, using the specified columnType to convert the value.

Random
Link copied to clipboard
class Random(val seed: Int? = null) : Function<BigDecimal>

Represents an SQL function that returns a random value in the range 0.0 <= x < 1.0, using the specified seed.

Rank
Link copied to clipboard
class Rank : WindowFunction<Long>

Represents an SQL function that returns the rank of the current row, with gaps; that is, the row_number of the first row in its peer group.

ReferenceOption
Link copied to clipboard
enum ReferenceOption : Enum<ReferenceOption>

Represents referential actions used by `ON UPDATE` or `ON DELETE` subclauses of a `FOREIGN KEY` constraint clause.

RegexpOp
Link copied to clipboard
class RegexpOp<T : String?>(val expr1: Expression<T>, val expr2: Expression<String>, val caseSensitive: Boolean) : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that checks if expr1 matches the regular expression expr2.

ResultRow
Link copied to clipboard
class ResultRow

A row of data representing a single record retrieved from a database result set.

RowNumber
Link copied to clipboard
class RowNumber : WindowFunction<Long>

Represents an SQL function that returns the number of the current row within its partition, counting from 1.

Schema
Link copied to clipboard
data class Schema(name: String, val authorization: String? = null, val password: String? = null, val defaultTablespace: String? = null, val temporaryTablespace: String? = null, val quota: String? = null, val on: String? = null)

Represents a database schema.

SchemaUtilityApi
Link copied to clipboard
abstract class SchemaUtilityApi

Base class representing helper functions necessary for creating, altering, and dropping database schema objects.

Select
Link copied to clipboard
typealias Select = Slice

Represents a subset of fields from a given source.

Sequence
Link copied to clipboard
class Sequence(val name: String, val startWith: Long? = null, val incrementBy: Long? = null, val minValue: Long? = null, val maxValue: Long? = null, val cycle: Boolean? = null, val cache: Long? = null)

Represents a database sequence.

ShortColumnType
Link copied to clipboard
class ShortColumnType : ColumnType<Short>

Numeric column for storing 2-byte integers.

Slf4jSqlDebugLogger
Link copied to clipboard
object Slf4jSqlDebugLogger : SqlLogger

Class representing a provider of log messages at DEBUG level.

Slice
Link copied to clipboard
class Slice(val source: ColumnSet, val fields: List<Expression<*>>) : FieldSet

Represents a subset of fields from a given source.

SortOrder
Link copied to clipboard
enum SortOrder : Enum<SortOrder>

Represents the SQL keywords for defining sort order in an `ORDER BY` clause.

SqlExpressionBuilder
Link copied to clipboard
object SqlExpressionBuilder : ISqlExpressionBuilder
SqlLogger
Link copied to clipboard
interface SqlLogger

Base class representing a provider of log messages.

StdDevPop
Link copied to clipboard
class StdDevPop<T>(val expression: Expression<T>, scale: Int) : Function<BigDecimal?> , WindowFunction<BigDecimal?>

Represents an SQL function that returns the population standard deviation of the non-null input values, or `null` if there are no non-null values.

StdDevSamp
Link copied to clipboard
class StdDevSamp<T>(val expression: Expression<T>, scale: Int) : Function<BigDecimal?> , WindowFunction<BigDecimal?>

Represents an SQL function that returns the sample standard deviation of the non-null input values, or `null` if there are no non-null values.

StdOutSqlLogger
Link copied to clipboard
object StdOutSqlLogger : SqlLogger

Class representing a provider of log messages sent to standard output stream.

StringColumnType
Link copied to clipboard
abstract class StringColumnType(val collate: String? = null) : ColumnType<String>

Base character column for storing strings using the specified text collate type.

SubQueryOp
Link copied to clipboard
sealed class SubQueryOp<T> : Op<Boolean> , ComplexExpression, Op.OpBoolean

Represents an SQL operator that compares expr to any row returned from query.

Substring
Link copied to clipboard
class Substring<T : String?>(expr: Expression<T>, start: Expression<Int>, val length: Expression<Int>) : Function<String>

Represents an SQL function that extract a substring from expr that begins at the specified start and with the specified length.

Sum
Link copied to clipboard
class Sum<T>(val expr: Expression<T>, columnType: IColumnType<T & Any>) : Function<T?> , WindowFunction<T?>

Represents an SQL function that returns the sum of expr across all non-null input values, or `null` if there are no non-null values.

Table
Link copied to clipboard
open class Table(name: String = "") : ColumnSet, DdlAware

Base class for any simple table.

TextColumnType
Link copied to clipboard
open class TextColumnType(collate: String? = null, val eagerLoading: Boolean = false) : StringColumnType

Character column for storing strings of arbitrary length using the specified collate type.

TimesOp
Link copied to clipboard
class TimesOp<T, S : T>(expr1: Expression<T>, expr2: Expression<S>, columnType: IColumnType<T & Any>) : CustomOperator<T>

Represents an SQL operator that multiplies expr1 by expr2.

Transaction
Link copied to clipboard
abstract class Transaction : UserDataHolder, TransactionInterface

Base class representing a unit block of work that is performed on a database.

Trim
Link copied to clipboard
class Trim<T : String?>(val expr: Expression<T>) : Function<String>

Represents an SQL function that remove the longest string containing only spaces from both ends of expr

UByteColumnType
Link copied to clipboard
class UByteColumnType : ColumnType<UByte>

Numeric column for storing unsigned 1-byte integers.

UIntegerColumnType
Link copied to clipboard
class UIntegerColumnType : ColumnType<UInt>

Numeric column for storing unsigned 4-byte integers.

ULongColumnType
Link copied to clipboard
class ULongColumnType : ColumnType<ULong>

Numeric column for storing unsigned 8-byte integers.

UnboundedFollowingWindowFrameBound
Link copied to clipboard
class UnboundedFollowingWindowFrameBound : UnboundedWindowFrameBound, CurrentOrFollowing

Represents UNBOUNDED FOLLOWING window function frame bound.

UnboundedPrecedingWindowFrameBound
Link copied to clipboard
class UnboundedPrecedingWindowFrameBound : UnboundedWindowFrameBound, CurrentOrPreceding

Represents UNBOUNDED PRECEDING window function frame bound.

UnboundedWindowFrameBound
Link copied to clipboard
open class UnboundedWindowFrameBound(direction: WindowFrameBoundDirection) : WindowFrameBound

Represents UNBOUNDED PRECEDING or FOLLOWING window function frame bound. direction specifies whether first or last partition row will be used.

UpperCase
Link copied to clipboard
class UpperCase<T : String?>(val expr: Expression<T>) : Function<String>

Represents an SQL function that converts expr to upper case.

UserDataHolder
Link copied to clipboard
open class UserDataHolder

Class for storing transaction data that should remain available to the transaction scope even after the transaction is committed.

UShortColumnType
Link copied to clipboard
class UShortColumnType : ColumnType<UShort>

Numeric column for storing unsigned 2-byte integers.

UuidColumnType
Link copied to clipboard
class UuidColumnType : BasicUuidColumnType<Uuid>

Binary column for storing kotlin.uuid.Uuid.

ValueCase
Link copied to clipboard
class ValueCase<T>(val value: ExpressionWithColumnType<T>)

Builder class for creating value-based CASE expressions where a specific value is compared against different conditions.

ValueCaseWhen
Link copied to clipboard
class ValueCaseWhen<T, R>(val value: ExpressionWithColumnType<T>) : BaseCaseWhen<R?>

Represents a value-based CASE expression that can be extended with additional WHEN clauses or completed with an ELSE clause.

ValueCaseWhenElse
Link copied to clipboard
class ValueCaseWhenElse<T, R>(val value: Expression<T>, val cases: List<Pair<Expression<T>, Expression<out R>>>, val elseResult: Expression<out R>) : BaseCaseWhen<R>

Represents a completed value-based CASE expression with an ELSE clause.

VarCharColumnType
Link copied to clipboard
open class VarCharColumnType(val colLength: Int = 255, collate: String? = null) : StringColumnType

Character column for storing strings with the specified maximum colLength using the specified collate type.

VarPop
Link copied to clipboard
class VarPop<T>(val expression: Expression<T>, scale: Int) : Function<BigDecimal?> , WindowFunction<BigDecimal?>

Represents an SQL function that returns the population variance of the non-null input values (square of the population standard deviation), or `null` if there are no non-null values.

VarSamp
Link copied to clipboard
class VarSamp<T>(val expression: Expression<T>, scale: Int) : Function<BigDecimal?> , WindowFunction<BigDecimal?>

Represents an SQL function that returns the sample variance of the non-null input values (square of the sample standard deviation), or `null` if there are no non-null values.

VectorFormat
Link copied to clipboard
enum VectorFormat : Enum<VectorFormat>

Possible dimension formats for a stored VECTOR data type.

Version
Link copied to clipboard
class Version(val major: Int, val minor: Int, val patch: Int)
WindowFrameBound
Link copied to clipboard
sealed interface WindowFrameBound

Represents an SQL window function frame start and end bound.

WindowFrameBoundDirection
Link copied to clipboard
enum WindowFrameBoundDirection : Enum<WindowFrameBoundDirection>

Represents window function frame bound direction.

WindowFrameClause
Link copied to clipboard
class WindowFrameClause(unit: WindowFrameUnit, start: WindowFrameBound, end: WindowFrameBound? = null)

Represents an SQL window function frame clause

WindowFrameUnit
Link copied to clipboard
enum WindowFrameUnit : Enum<WindowFrameUnit>

Represents an SQL window function frame unit (also called mode).

WindowFunction
Link copied to clipboard
interface WindowFunction<T>

Interface for functions that can be used as window functions.

WindowFunctionDefinition
Link copied to clipboard
class WindowFunctionDefinition<T>(val columnType: IColumnType<T & Any>, function: WindowFunction<T>) : ExpressionWithColumnType<T>

Represents an SQL window function with window definition.

XorBitOp
Link copied to clipboard
class XorBitOp<T, S : T>(val expr1: Expression<T>, val expr2: Expression<S>, val columnType: IColumnType<T & Any>) : ExpressionWithColumnType<T>

Represents an SQL operator that performs a bitwise `or` on expr1 and expr2.

## Properties

autoIncColumnType
Link copied to clipboard
val Column<*>.autoIncColumnType: AutoIncColumnType<*>?

Returns this column's type cast as AutoIncColumnType or `null` if the cast fails.

exposedLogger
Link copied to clipboard
val exposedLogger: Logger

Returns a org.slf4j.Logger named specifically for Exposed log messages.

isAutoInc
Link copied to clipboard
val IColumnType<*>.isAutoInc: Boolean

Returns `true` if this is an auto-increment column, `false` otherwise.

lastQueryAlias
Link copied to clipboard
val Join.lastQueryAlias: QueryAlias?

Returns the most recent QueryAlias instance used to create this join relation, or `null` if a query was not joined.

## Functions

alias
Link copied to clipboard
fun <T : AbstractQuery<*>> T.alias(alias: String): QueryAlias

Creates a temporary identifier, alias, for this query.

fun <T : Table> T.alias(alias: String): Alias<T>

Creates a temporary identifier, alias, for this table.

fun <T> ExpressionWithColumnType<T>.alias(alias: String): ExpressionWithColumnTypeAlias<T>

Creates a temporary identifier, alias, for this expression with column type.

fun <T> Expression<T>.alias(alias: String): ExpressionAlias<T>

Creates a temporary identifier, alias, for this expression.

allFrom
Link copied to clipboard
fun <T> allFrom(subQuery: AbstractQuery<*>): Op<T>

Returns this subquery wrapped in the `ALL` operator. This function is not supported by the SQLite dialect.

fun <E, T : List<E>?> allFrom(expression: Expression<T>): Op<E>

Returns this expression wrapped in the `ALL` operator. This function is only supported by PostgreSQL and H2 dialects.

fun <T> allFrom(table: Table): Op<T>

Returns this table wrapped in the `ALL` operator. This function is only supported by MySQL, PostgreSQL, and H2 dialects.

inline fun <T : Any> allFrom(array: Array<T>, delegateType: ColumnType<T>? = null): Op<T>

Returns this array of data wrapped in the `ALL` operator. This function is only supported by PostgreSQL and H2 dialects.

inline fun <T : Any> allFrom(array: List<T>, delegateType: ColumnType<T>? = null): Op<T>

Returns this list of data wrapped in the `ALL` operator. This function is only supported by PostgreSQL and H2 dialects.

and
Link copied to clipboard
inline fun Expression<Boolean>.and(op: () -> Op<Boolean>): Op<Boolean>
infix fun Expression<Boolean>.and(op: Expression<Boolean>): Op<Boolean>

Returns the result of performing a logical `and` operation between this expression and the op.

andIfNotNull
Link copied to clipboard
inline fun Op<Boolean>.andIfNotNull(op: () -> Op<Boolean>?): Op<Boolean>
infix fun Op<Boolean>.andIfNotNull(op: Expression<Boolean>?): Op<Boolean>

Returns the result of performing a logical `and` operation between this expression and the op if op is not null. Otherwise, this expression will be returned.

andNot
Link copied to clipboard
inline fun Expression<Boolean>.andNot(op: () -> Op<Boolean>): Op<Boolean>

Returns the result of performing a logical `and` operation between this expression and the negate op.

anyFrom
Link copied to clipboard
fun <T> anyFrom(subQuery: AbstractQuery<*>): Op<T>

Returns this subquery wrapped in the `ANY` operator. This function is not supported by the SQLite dialect.

fun <E, T : List<E>?> anyFrom(expression: Expression<T>): Op<E>

Returns this expression wrapped in the `ANY` operator. This function is only supported by PostgreSQL and H2 dialects.

fun <T> anyFrom(table: Table): Op<T>

Returns this table wrapped in the `ANY` operator. This function is only supported by MySQL, PostgreSQL, and H2 dialects.

inline fun <T : Any> anyFrom(array: Array<T>, delegateType: ColumnType<T>? = null): Op<T>

Returns this array of data wrapped in the `ANY` operator. This function is only supported by PostgreSQL and H2 dialects.

inline fun <T : Any> anyFrom(array: List<T>, delegateType: ColumnType<T>? = null): Op<T>

Returns this list of data wrapped in the `ANY` operator. This function is only supported by PostgreSQL and H2 dialects.

append
Link copied to clipboard
fun QueryBuilder.append(vararg expr: Any): QueryBuilder

Appends all arguments to this QueryBuilder.

appendTo
Link copied to clipboard
fun <T> Iterable<T>.appendTo(builder: QueryBuilder, separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", transform: QueryBuilder.(T) -> Unit): QueryBuilder

Appends all the elements separated using separator and using the given prefix and postfix if supplied.

arrayLiteral
Link copied to clipboard
inline fun <T : Any> arrayLiteral(value: List<T>, delegateType: ColumnType<T>? = null): LiteralOp<List<T>>
inline fun <T : Any, R : List<Any>> arrayLiteral(value: R, dimensions: Int, delegateType: ColumnType<T>? = null): LiteralOp<R>

Returns the specified value as an array literal, with elements parsed by the delegateType if provided.

arrayParam
Link copied to clipboard
inline fun <T : Any> arrayParam(value: List<T>, delegateType: ColumnType<T>? = null): Expression<List<T>>
inline fun <T : Any, R : List<Any>> arrayParam(value: R, dimensions: Int, delegateType: ColumnType<T>? = null): Expression<R>

Returns the specified value as an array query parameter, with elements parsed by the delegateType if provided.

asLiteral
Link copied to clipboard
fun <T, S : T?> ExpressionWithColumnType<S>.asLiteral(value: T): LiteralOp<T>

Returns the specified value as a literal of type T.

avg
Link copied to clipboard
fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<S>.avg(scale: Int = 2): Avg<T, S>

Returns the average (arithmetic mean) value of this expression across all non-null input values, or `null` if there are no non-null values.

between
Link copied to clipboard
fun <T : Any, E : EntityID<T>?> Column<E>.between(from: T, to: T): Between

Returns `true` if this EntityID expression is between the values from and to, `false` otherwise.

fun <T, S : T?> ExpressionWithColumnType<in S>.between(from: T, to: T): Between

Returns `true` if this expression is between the values from and to, `false` otherwise.

bitwiseAnd
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.bitwiseAnd(t: T): AndBitOp<T, T>

Performs a bitwise `and` on this expression and t.

infix fun <T> ExpressionWithColumnType<T>.bitwiseAnd(t: Expression<T>): AndBitOp<T, T>

Performs a bitwise `and` on this expression and expression t.

bitwiseOr
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.bitwiseOr(t: T): OrBitOp<T, T>

Performs a bitwise `or` on this expression and t.

infix fun <T> ExpressionWithColumnType<T>.bitwiseOr(t: Expression<T>): OrBitOp<T, T>

Performs a bitwise `or` on this expression and expression t.

bitwiseXor
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.bitwiseXor(t: T): XorBitOp<T, T>

Performs a bitwise `or` on this expression and t.

infix fun <T> ExpressionWithColumnType<T>.bitwiseXor(t: Expression<T>): XorBitOp<T, T>

Performs a bitwise `or` on this expression and expression t.

blobParam
Link copied to clipboard
fun blobParam(value: ExposedBlob, useObjectIdentifier: Boolean = false): Expression<ExposedBlob>

Returns the specified value as a blob query parameter.

booleanLiteral
Link copied to clipboard
fun booleanLiteral(value: Boolean): LiteralOp<Boolean>

Returns the specified value as a boolean literal.

booleanParam
Link copied to clipboard
fun booleanParam(value: Boolean): Expression<Boolean>

Returns the specified value as a boolean query parameter.

byteLiteral
Link copied to clipboard
fun byteLiteral(value: Byte): LiteralOp<Byte>

Returns the specified value as a byte literal.

byteParam
Link copied to clipboard
fun byteParam(value: Byte): Expression<Byte>

Returns the specified value as a byte query parameter.

case
Link copied to clipboard
fun case(): Case

Creates a conditional CASE expression builder where each WHEN clause contains an independent boolean condition that is evaluated separately.

fun <T> case(value: ExpressionWithColumnType<T>): ValueCase<T>

Creates a value-based CASE expression builder that compares a specific value against different conditions in each WHEN clause.

castTo
Link copied to clipboard
fun <R> Expression<*>.castTo(columnType: IColumnType<R & Any>): ExpressionWithColumnType<R>

Specifies a conversion from one data type to another.

charLength
Link copied to clipboard
fun <T : String?> Expression<T>.charLength(): CharLength<T>

Returns the length of this string expression, measured in characters, or `null` if this expression is null.

coalesce
Link copied to clipboard
fun <T, S : T?> coalesce(expr: ExpressionWithColumnType<S>, alternate: Expression<out T>, vararg others: Expression<out T>): Coalesce<T, S>

Returns the first of its arguments that is not null.

columnTransformer
Link copied to clipboard
fun <Unwrapped, Wrapped> columnTransformer(unwrap: (value: Wrapped) -> Unwrapped, wrap: (value: Unwrapped) -> Wrapped): ColumnTransformer<Unwrapped, Wrapped>
compoundAnd
Link copied to clipboard
fun List<Op<Boolean>>.compoundAnd(): Op<Boolean>

Reduces this list to a single expression by performing an `and` operation between all the expressions in the list.

compoundOr
Link copied to clipboard
fun List<Op<Boolean>>.compoundOr(): Op<Boolean>

Reduces this list to a single expression by performing an `or` operation between all the expressions in the list.

concat
Link copied to clipboard
fun concat(vararg expr: Expression<*>): Concat

Concatenates the text representations of all the expr.

fun concat(separator: String = "", expr: List<Expression<*>>): Concat

Concatenates the text representations of all the expr using the specified separator.

cosineDistance
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.cosineDistance(target: Expression<T>): VectorDistance<T>

Returns the mathematical distance calculated between the two vector expressions, based on cosine similarity.

fun ExpressionWithColumnType<FloatArray>.cosineDistance(target: FloatArray): VectorDistance<FloatArray>
fun ExpressionWithColumnType<IntArray>.cosineDistance(target: IntArray): VectorDistance<IntArray>

Returns the mathematical distance calculated between this vector expression and a target vector, based on cosine similarity.

count
Link copied to clipboard
fun ExpressionWithColumnType<*>.count(): Count

Returns the number of input rows for which the value of this expression is not null.

countDistinct
Link copied to clipboard
fun Column<*>.countDistinct(): Count

Returns the number of distinct input rows for which the value of this expression is not null.

crossJoin
Link copied to clipboard
fun <C1 : ColumnSet, C2 : ColumnSet> C1.crossJoin(otherTable: C2, onColumn: C1.() -> Expression<*>? = null, otherColumn: C2.() -> Expression<*>? = null, additionalConstraint: () -> Op<Boolean>? = null): Join

Creates a cross join relation with otherTable using onColumn and otherColumn equality and/or additionalConstraint as the join condition.

cumeDist
Link copied to clipboard
fun cumeDist(): CumeDist

Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/N to 1.

CustomLongFunction
Link copied to clipboard
fun CustomLongFunction(functionName: String, vararg params: Expression<*>): CustomFunction<Long?>

Calls a custom SQL function with the specified functionName, that returns a long, and passing params as its arguments.

CustomStringFunction
Link copied to clipboard
fun CustomStringFunction(functionName: String, vararg params: Expression<*>): CustomFunction<String?>

Calls a custom SQL function with the specified functionName, that returns a string, and passing params as its arguments.

decimalLiteral
Link copied to clipboard
fun decimalLiteral(value: BigDecimal): LiteralOp<BigDecimal>

Returns the specified value as a decimal literal.

decimalParam
Link copied to clipboard
fun decimalParam(value: BigDecimal): Expression<BigDecimal>

Returns the specified value as a decimal query parameter.

denseRank
Link copied to clipboard
fun denseRank(): DenseRank

Returns the rank of the current row, without gaps; this function effectively counts peer groups.

div
Link copied to clipboard
infix operator fun <T> ExpressionWithColumnType<T>.div(t: T): DivideOp<T, T>

Divides this expression by the t value.

infix operator fun <T, S : T> ExpressionWithColumnType<T>.div(other: Expression<S>): DivideOp<T, S>

Divides this expression by the other expression.

dotDistance
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.dotDistance(target: Expression<T>): VectorDistance<T>

Returns the mathematical distance calculated between the two vector expressions, based on dot product similarity.

fun ExpressionWithColumnType<FloatArray>.dotDistance(target: FloatArray): VectorDistance<FloatArray>
fun ExpressionWithColumnType<IntArray>.dotDistance(target: IntArray): VectorDistance<IntArray>

Returns the mathematical distance calculated between this vector expression and a target vector, based on dot product similarity.

doubleLiteral
Link copied to clipboard
fun doubleLiteral(value: Double): LiteralOp<Double>

Returns the specified value as a double literal.

doubleParam
Link copied to clipboard
fun doubleParam(value: Double): Expression<Double>

Returns the specified value as a double query parameter.

eq
Link copied to clipboard
infix fun <T> CompositeColumn<T>.eq(t: T): Op<Boolean>
infix fun <T> ExpressionWithColumnType<T>.eq(t: T): Op<Boolean>

Checks if this expression is equal to some t value.

@JvmName(name = "eqEntityIDValue")
infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.eq(t: V): Op<Boolean>

Checks if this EntityID expression is equal to some t value.

infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.eq(other: Expression<V>): Op<Boolean>

Checks if this EntityID expression is equal to some other expression.

infix fun <T, S1 : T?, S2 : T?> Expression<in S1>.eq(other: Expression<in S2>): Op<Boolean>

Checks if this expression is equal to some other expression.

infix fun <T : Any, V : T?, E : EntityID<T>?> Expression<V>.eq(other: ExpressionWithColumnType<E>): Op<Boolean>

Checks if this expression is equal to some other expression.

eqSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.eqSubQuery(query: AbstractQuery<*>): EqSubQueryOp<T>

Checks if this expression is equals to single value returned from query.

euclideanDistance
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.euclideanDistance(target: Expression<T>): VectorDistance<T>

Returns the mathematical distance calculated between the two vector expressions, based on euclidean similarity.

fun ExpressionWithColumnType<FloatArray>.euclideanDistance(target: FloatArray): VectorDistance<FloatArray>
fun ExpressionWithColumnType<IntArray>.euclideanDistance(target: IntArray): VectorDistance<IntArray>

Returns the mathematical distance calculated between this vector expression and a target vector, based on euclidean similarity.

exists
Link copied to clipboard
fun exists(query: AbstractQuery<*>): Exists

Returns an SQL operator that checks if query returns at least one row.

firstValue
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.firstValue(): FirstValue<T>

Returns value evaluated at the row that is the first row of the window frame.

floatLiteral
Link copied to clipboard
fun floatLiteral(value: Float): LiteralOp<Float>

Returns the specified value as a float literal.

floatParam
Link copied to clipboard
fun floatParam(value: Float): Expression<Float>

Returns the specified value as a float query parameter.

fullJoin
Link copied to clipboard
fun <C1 : ColumnSet, C2 : ColumnSet> C1.fullJoin(otherTable: C2, onColumn: C1.() -> Expression<*>? = null, otherColumn: C2.() -> Expression<*>? = null, additionalConstraint: () -> Op<Boolean>? = null): Join

Creates a full outer join relation with otherTable using onColumn and otherColumn equality and/or additionalConstraint as the join condition.

function
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.function(functionName: String): CustomFunction<T?>

Calls a custom SQL function with the specified functionName and passes this expression as its only argument.

get
Link copied to clipboard
infix operator fun <E, T : List<E>?> ExpressionWithColumnType<T>.get(index: Int): ArrayGet<E, T>

Returns the array element stored at the one-based index position, or `null` if the stored array itself is null.

greater
Link copied to clipboard
@JvmName(name = "greaterEntityID")
infix fun <T : Comparable<T>> Column<EntityID<T>>.greater(t: T): GreaterOp

Checks if this EntityID expression is greater than some t value.

infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.greater(t: T): GreaterOp

Checks if this expression is greater than some t value.

infix fun <T : Comparable<T>, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.greater(other: Expression<in V>): GreaterOp

Checks if this EntityID expression is greater than some other expression.

infix fun <T : Comparable<T>, V : T?, E : EntityID<T>?> Expression<V>.greater(other: ExpressionWithColumnType<E>): GreaterOp

Checks if this expression is greater than some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.greater(other: Expression<in S>): GreaterOp

Checks if this expression is greater than some other expression.

@JvmName(name = "greaterBetweenEntityIDs")
infix fun <T : Comparable<T>, E : EntityID<T>?> Expression<E>.greater(other: Expression<E>): GreaterOp

Checks if this EntityID expression is greater than some other expression.

greaterEq
Link copied to clipboard
@JvmName(name = "greaterEqEntityID")
infix fun <T : Comparable<T>> Column<EntityID<T>>.greaterEq(t: T): GreaterEqOp

Checks if this EntityID expression is greater than or equal to some t value

infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.greaterEq(t: T): GreaterEqOp

Checks if this expression is greater than or equal to some t value

infix fun <T : Comparable<T>, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.greaterEq(other: Expression<in V>): GreaterEqOp

Checks if this EntityID expression is greater than or equal to some other expression

infix fun <T : Comparable<T>, V : T?, E : EntityID<T>?> Expression<V>.greaterEq(other: ExpressionWithColumnType<E>): GreaterEqOp

Checks if this expression is greater than or equal to some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.greaterEq(other: Expression<in S>): GreaterEqOp

Checks if this expression is greater than or equal to some other expression

@JvmName(name = "greaterEqBetweenEntityIDs")
infix fun <T : Comparable<T>, E : EntityID<T>?> Expression<E>.greaterEq(other: Expression<E>): GreaterEqOp

Checks if this EntityID expression is greater than or equal to some other expression.

greaterEqSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.greaterEqSubQuery(query: AbstractQuery<*>): GreaterEqSubQueryOp<T>

Checks if this expression is greater than or equal to the single value returned from query.

greaterSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.greaterSubQuery(query: AbstractQuery<*>): GreaterSubQueryOp<T>

Checks if this expression is greater than the single value returned from query.

groupConcat
Link copied to clipboard
fun <T : String?> Expression<T>.groupConcat(separator: String? = null, distinct: Boolean = false, orderBy: Array<Pair<Expression<*>, SortOrder>> = emptyArray()): GroupConcat<T>
fun <T : String?> Expression<T>.groupConcat(separator: String? = null, distinct: Boolean = false, orderBy: Pair<Expression<*>, SortOrder>): GroupConcat<T>

Concatenates all non-null input values of each group from this string expression, separated by separator.

hasFlag
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.hasFlag(t: T): EqOp

Performs a bitwise `and` on this expression and t.

infix fun <T> ExpressionWithColumnType<T>.hasFlag(t: Expression<T>): EqOp

Performs a bitwise `and` on this expression and expression t.

idParam
Link copied to clipboard
fun <T : Any> idParam(value: EntityID<T>, column: Column<EntityID<T>>): Expression<EntityID<T>>

Returns the specified value as a query parameter with the same type as column.

inList
Link copied to clipboard
infix fun <T1, T2> Pair<ExpressionWithColumnType<T1>, ExpressionWithColumnType<T2>>.inList(list: Iterable<Pair<T1, T2>>): InListOrNotInListBaseOp<Pair<T1, T2>>

Checks if expressions from this `Pair` are equal to elements from list. This syntax is unsupported by SQL Server.

infix fun <T1, T2, T3> Triple<ExpressionWithColumnType<T1>, ExpressionWithColumnType<T2>, ExpressionWithColumnType<T3>>.inList(list: Iterable<Triple<T1, T2, T3>>): InListOrNotInListBaseOp<Triple<T1, T2, T3>>

Checks if expressions from this `Triple` are equal to elements from list. This syntax is unsupported by SQL Server.

infix fun List<Column<*>>.inList(list: Iterable<List<*>>): InListOrNotInListBaseOp<List<*>>

Checks if all columns in this `List` are equal to any of the lists of values from list.

@JvmName(name = "inListCompositeIDs")
infix fun List<Column<*>>.inList(list: Iterable<CompositeID>): InListOrNotInListBaseOp<List<*>>

Checks if all columns in this `List` are equal to any of the CompositeIDs from list.

@JvmName(name = "inListIds")
infix fun <T : Any, ID : EntityID<T>?> Column<ID>.inList(list: Iterable<T>): InListOrNotInListBaseOp<EntityID<T>?>
@JvmName(name = "inListCompositeEntityIds")
infix fun <ID : EntityID<CompositeID>> Column<ID>.inList(list: Iterable<CompositeID>): InListOrNotInListBaseOp<List<*>>

Checks if this EntityID column is equal to any element from list.

infix fun <T> ExpressionWithColumnType<T>.inList(list: Iterable<T>): InListOrNotInListBaseOp<T>

Checks if this expression is equal to any element from list.

innerJoin
Link copied to clipboard
fun <C1 : ColumnSet, C2 : ColumnSet> C1.innerJoin(otherTable: C2, onColumn: C1.() -> Expression<*>? = null, otherColumn: C2.() -> Expression<*>? = null, additionalConstraint: () -> Op<Boolean>? = null): Join

Creates an inner join relation with otherTable using onColumn and otherColumn equality and/or additionalConstraint as the join condition.

inSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.inSubQuery(query: AbstractQuery<*>): InSubQueryOp<T>

Checks if this expression is equals to any row returned from query.

inTable
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.inTable(table: Table): InTableOp

Checks if this expression is equal to any element from the column of table with only a single column.

intLiteral
Link copied to clipboard
fun intLiteral(value: Int): LiteralOp<Int>

Returns the specified value as an int literal.

intParam
Link copied to clipboard
fun intParam(value: Int): Expression<Int>

Returns the specified value as an int query parameter.

intToDecimal
Link copied to clipboard
fun ExpressionWithColumnType<Int>.intToDecimal(): NoOpConversion<Int, BigDecimal>

Changes this integer expression to a BigDecimal type.

isDistinctFrom
Link copied to clipboard
@JvmName(name = "isDistinctFromEntityID")
infix fun <T : Any> Column<EntityID<T>>.isDistinctFrom(t: T): IsDistinctFromOp
infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.isDistinctFrom(t: T): IsDistinctFromOp

Checks if this expression is not equal to some t value, with `null` treated as a comparable value

infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.isDistinctFrom(other: Expression<in V>): IsDistinctFromOp

Checks if this EntityID expression is not equal to some other expression

infix fun <T : Any, V : T?, E : EntityID<T>?> Expression<in V>.isDistinctFrom(other: ExpressionWithColumnType<E>): IsDistinctFromOp

Checks if this expression is not equal to some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.isDistinctFrom(other: Expression<in S>): IsDistinctFromOp

Checks if this expression is not equal to some other expression, with `null` treated as a comparable value

isNotDistinctFrom
Link copied to clipboard
@JvmName(name = "isNotDistinctFromEntityID")
infix fun <T : Any> Column<EntityID<T>>.isNotDistinctFrom(t: T): IsNotDistinctFromOp
infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.isNotDistinctFrom(t: T): IsNotDistinctFromOp

Checks if this expression is equal to some t value, with `null` treated as a comparable value

infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.isNotDistinctFrom(other: Expression<in V>): IsNotDistinctFromOp

Checks if this EntityID expression is equal to some other expression

infix fun <T : Any, V : T?, E : EntityID<T>?> Expression<V>.isNotDistinctFrom(other: ExpressionWithColumnType<E>): IsNotDistinctFromOp

Checks if this expression is equal to some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.isNotDistinctFrom(other: Expression<in S>): IsNotDistinctFromOp

Checks if this expression is equal to some other expression, with `null` treated as a comparable value

isNotNull
Link copied to clipboard
fun <T> Expression<T>.isNotNull(): Op<Boolean>

Returns `true` if this expression is not null, `false` otherwise.

isNull
Link copied to clipboard
fun <T> Expression<T>.isNull(): Op<Boolean>

Returns `true` if this expression is null, `false` otherwise.

isNullOrEmpty
Link copied to clipboard
fun <T : String?> Expression<T>.isNullOrEmpty(): Op<Boolean>

Returns `true` if this string expression is null or empty, `false` otherwise.

joinQuery
Link copied to clipboard
fun Join.joinQuery(on: (QueryAlias) -> Op<Boolean>? = null, joinType: JoinType = JoinType.INNER, lateral: Boolean = false, joinPart: () -> AbstractQuery<*>): Join

Creates a join relation with a query.

fun Table.joinQuery(on: (QueryAlias) -> Op<Boolean>? = null, joinType: JoinType = JoinType.INNER, lateral: Boolean = false, joinPart: () -> AbstractQuery<*>): Join

Creates a join relation between this table and a query.

lag
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.lag(offset: ExpressionWithColumnType<Int> = intLiteral(1), defaultValue: ExpressionWithColumnType<T>? = null): Lag<T>

Returns value evaluated at the row that is offset rows before the current row within the partition; if there is no such row, instead returns defaultValue. Both offset and defaultValue are evaluated with respect to the current row.

lastValue
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.lastValue(): LastValue<T>

Returns value evaluated at the row that is the last row of the window frame.

lead
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.lead(offset: ExpressionWithColumnType<Int> = intLiteral(1), defaultValue: ExpressionWithColumnType<T>? = null): Lead<T>

Returns value evaluated at the row that is offset rows after the current row within the partition; if there is no such row, instead returns defaultValue. Both offset and defaultValue are evaluated with respect to the current row.

leftJoin
Link copied to clipboard
fun <C1 : ColumnSet, C2 : ColumnSet> C1.leftJoin(otherTable: C2, onColumn: C1.() -> Expression<*>? = null, otherColumn: C2.() -> Expression<*>? = null, additionalConstraint: () -> Op<Boolean>? = null): Join

Creates a left outer join relation with otherTable using onColumn and otherColumn equality and/or additionalConstraint as the join condition.

less
Link copied to clipboard
@JvmName(name = "lessEntityID")
infix fun <T : Comparable<T>> Column<EntityID<T>>.less(t: T): LessOp

Checks if this EntityID expression is less than some t value.

infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.less(t: T): LessOp

Checks if this expression is less than some t value.

infix fun <T : Comparable<T>, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.less(other: Expression<in V>): LessOp

Checks if this EntityID expression is less than some other expression.

infix fun <T : Comparable<T>, V : T?, E : EntityID<T>?> Expression<V>.less(other: ExpressionWithColumnType<E>): LessOp

Checks if this expression is less than some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.less(other: Expression<in S>): LessOp

Checks if this expression is less than some other expression.

@JvmName(name = "lessBetweenEntityIDs")
infix fun <T : Comparable<T>, E : EntityID<T>?> Expression<E>.less(other: Expression<E>): LessOp

Checks if this EntityID expression is less than some other expression.

lessEq
Link copied to clipboard
@JvmName(name = "lessEqEntityID")
infix fun <T : Comparable<T>> Column<EntityID<T>>.lessEq(t: T): LessEqOp

Checks if this EntityID expression is less than or equal to some t value

infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.lessEq(t: T): LessEqOp

Checks if this expression is less than or equal to some t value

infix fun <T : Comparable<T>, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.lessEq(other: Expression<in V>): LessEqOp

Checks if this EntityID expression is less than or equal to some other expression

infix fun <T : Comparable<T>, V : T?, E : EntityID<T>?> Expression<V>.lessEq(other: ExpressionWithColumnType<E>): LessEqOp

Checks if this expression is less than or equal to some other expression.

infix fun <T : Comparable<T>, S : T?> Expression<in S>.lessEq(other: Expression<in S>): LessEqOp

Checks if this expression is less than or equal to some other expression

@JvmName(name = "lessEqBetweenEntityIDs")
infix fun <T : Comparable<T>, E : EntityID<T>?> Expression<E>.lessEq(other: Expression<E>): LessEqOp

Checks if this EntityID expression is less than or equal to some other expression.

lessEqSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.lessEqSubQuery(query: AbstractQuery<*>): LessEqSubQueryOp<T>

Checks if this expression is less than or equal to the single value returned from query.

lessSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.lessSubQuery(query: AbstractQuery<*>): LessSubQueryOp<T>

Checks if this expression is less than the single value returned from query.

like
Link copied to clipboard
infix fun <T : String?> Expression<T>.like(pattern: String): LikeEscapeOp
infix fun <T : String?> Expression<T>.like(pattern: LikePattern): LikeEscapeOp
@JvmName(name = "likeWithEntityID")
infix fun Expression<EntityID<String>>.like(pattern: String): LikeEscapeOp
@JvmName(name = "likeWithEntityID")
infix fun Expression<EntityID<String>>.like(pattern: LikePattern): LikeEscapeOp

Checks if this expression matches the specified pattern.

infix fun <T : String?> Expression<T>.like(expression: ExpressionWithColumnType<String>): LikeEscapeOp
@JvmName(name = "likeWithEntityIDAndExpression")
infix fun Expression<EntityID<String>>.like(expression: ExpressionWithColumnType<String>): LikeEscapeOp

Checks if this expression matches the specified expression.

locate
Link copied to clipboard
fun <T : String?> Expression<T>.locate(substring: String): Locate<T>

Returns the index of the first occurrence of substring in this string expression or 0 if it doesn't contain substring

longLiteral
Link copied to clipboard
fun longLiteral(value: Long): LiteralOp<Long>

Returns the specified value as a long literal.

longParam
Link copied to clipboard
fun longParam(value: Long): Expression<Long>

Returns the specified value as a long query parameter.

lowerCase
Link copied to clipboard
fun <T : String?> Expression<T>.lowerCase(): LowerCase<T>

Converts this string expression to lower case.

match
Link copied to clipboard
infix fun <T : String?> Expression<T>.match(pattern: String): Op<Boolean>

Checks if this expression matches the specified pattern.

fun <T : String?> Expression<T>.match(pattern: String, mode: FunctionProvider.MatchMode?): Op<Boolean>

Checks if this expression matches the specified pattern using the specified match mode.

max
Link copied to clipboard
fun <T : Any, S : T?> ExpressionWithColumnType<in S>.max(): Max<T, S>

Returns the maximum value of this expression across all non-null input values, or `null` if there are no non-null values.

min
Link copied to clipboard
fun <T : Any, S : T?> ExpressionWithColumnType<in S>.min(): Min<T, S>

Returns the minimum value of this expression across all non-null input values, or `null` if there are no non-null values.

minus
Link copied to clipboard
infix operator fun <T> ExpressionWithColumnType<T>.minus(t: T): MinusOp<T, T>

Subtracts the t value from this expression.

infix operator fun <T, S : T> ExpressionWithColumnType<T>.minus(other: Expression<S>): MinusOp<T, S>

Subtracts the other expression from this expression.

mod
Link copied to clipboard
infix fun <T : Number?, S : T> ExpressionWithColumnType<T>.mod(t: S): ModOp<T, S, T>

Calculates the remainder of dividing this expression by the t value.

infix fun <T : Number?, S : Number> ExpressionWithColumnType<T>.mod(other: Expression<S>): ModOp<T, S, T>

Calculates the remainder of dividing this expression by the other expression.

@JvmName(name = "modWithEntityId")
infix fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> ExpressionWithColumnType<ID>.mod(other: S): ExpressionWithColumnType<T>

Calculates the remainder of dividing the value of this numeric PK by the other number.

@JvmName(name = "modWithEntityId3")
infix fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> ExpressionWithColumnType<ID>.mod(other: Expression<S>): ExpressionWithColumnType<T>

Calculates the remainder of dividing the value of this numeric PK by the other number expression.

@JvmName(name = "modWithEntityId2")
infix fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> Expression<S>.mod(other: ExpressionWithColumnType<ID>): ExpressionWithColumnType<T>

Calculates the remainder of dividing this number expression by other numeric PK

neq
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.neq(other: T): Op<Boolean>

Checks if this expression is not equal to some other value.

@JvmName(name = "neqEntityIDValue")
infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.neq(t: V): Op<Boolean>

Checks if this EntityID expression is not equal to some t value.

infix fun <T : Any, E : EntityID<T>?, V : T?> ExpressionWithColumnType<E>.neq(other: Expression<V>): Op<Boolean>

Checks if this EntityID expression is not equal to some other expression.

infix fun <T, S1 : T?, S2 : T?> Expression<in S1>.neq(other: Expression<in S2>): Op<Boolean>

Checks if this expression is not equal to some other expression.

infix fun <T : Any, V : T?, E : EntityID<T>?> Expression<V>.neq(other: ExpressionWithColumnType<E>): Op<Boolean>

Checks if this expression is not equal to some other expression.

nextIntVal
Link copied to clipboard
fun Sequence.nextIntVal(): NextVal<Int>

Advances this sequence and returns the new value.

nextLongVal
Link copied to clipboard
fun Sequence.nextLongVal(): NextVal<Long>

Advances this sequence and returns the new value.

not
Link copied to clipboard
fun not(op: Expression<Boolean>): Op<Boolean>

Returns the inverse of this boolean expression.

notEqSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.notEqSubQuery(query: AbstractQuery<*>): NotEqSubQueryOp<T>

Checks if this expression is not equals to single value returned from query.

notExists
Link copied to clipboard
fun notExists(query: AbstractQuery<*>): NotExists

Returns an SQL operator that checks if query doesn't returns any row.

notInList
Link copied to clipboard
infix fun <T1, T2> Pair<ExpressionWithColumnType<T1>, ExpressionWithColumnType<T2>>.notInList(list: Iterable<Pair<T1, T2>>): InListOrNotInListBaseOp<Pair<T1, T2>>

Checks if expressions from this `Pair` are not equal to elements from list. This syntax is unsupported by SQL Server.

infix fun <T1, T2, T3> Triple<ExpressionWithColumnType<T1>, ExpressionWithColumnType<T2>, ExpressionWithColumnType<T3>>.notInList(list: Iterable<Triple<T1, T2, T3>>): InListOrNotInListBaseOp<Triple<T1, T2, T3>>

Checks if expressions from this `Triple` are not equal to elements from list. This syntax is unsupported by SQL Server.

infix fun List<Column<*>>.notInList(list: Iterable<List<*>>): InListOrNotInListBaseOp<List<*>>

Checks if all columns in this `List` are not equal to any of the lists of values from list.

@JvmName(name = "notInListCompositeIDs")
infix fun List<Column<*>>.notInList(list: Iterable<CompositeID>): InListOrNotInListBaseOp<List<*>>

Checks if all columns in this `List` are not equal to any of the CompositeIDs from list.

@JvmName(name = "notInListIds")
infix fun <T : Any, ID : EntityID<T>?> Column<ID>.notInList(list: Iterable<T>): InListOrNotInListBaseOp<EntityID<T>?>
@JvmName(name = "notInListCompositeEntityIds")
infix fun <ID : EntityID<CompositeID>> Column<ID>.notInList(list: Iterable<CompositeID>): InListOrNotInListBaseOp<List<*>>

Checks if this EntityID column is not equal to any element from list.

infix fun <T> ExpressionWithColumnType<T>.notInList(list: Iterable<T>): InListOrNotInListBaseOp<T>

Checks if this expression is not equal to any element from list.

notInSubQuery
Link copied to clipboard
infix fun <T> Expression<T>.notInSubQuery(query: AbstractQuery<*>): NotInSubQueryOp<T>

Checks if this expression is not equals to any row returned from query.

notInTable
Link copied to clipboard
infix fun <T> ExpressionWithColumnType<T>.notInTable(table: Table): InTableOp

Checks if this expression is not equal to any element from the column of table with only a single column.

notLike
Link copied to clipboard
infix fun <T : String?> Expression<T>.notLike(pattern: String): LikeEscapeOp
infix fun <T : String?> Expression<T>.notLike(pattern: LikePattern): LikeEscapeOp
@JvmName(name = "notLikeWithEntityID")
infix fun Expression<EntityID<String>>.notLike(pattern: String): LikeEscapeOp
@JvmName(name = "notLikeWithEntityID")
infix fun Expression<EntityID<String>>.notLike(pattern: LikePattern): LikeEscapeOp

Checks if this expression doesn't match the specified pattern.

infix fun <T : String?> Expression<T>.notLike(expression: ExpressionWithColumnType<String>): LikeEscapeOp

Checks if this expression doesn't match the specified pattern.

@JvmName(name = "notLikeWithEntityIDAndExpression")
infix fun Expression<EntityID<String>>.notLike(expression: ExpressionWithColumnType<String>): LikeEscapeOp

Checks if this expression doesn't match the specified expression.

nthValue
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.nthValue(n: ExpressionWithColumnType<Int>): NthValue<T>

Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); null if no such row.

ntile
Link copied to clipboard
fun ntile(numBuckets: ExpressionWithColumnType<Int>): Ntile

Returns an integer ranging from 1 to the numBuckets, dividing the partition as equally as possible.

or
Link copied to clipboard
inline fun Expression<Boolean>.or(op: () -> Op<Boolean>): Op<Boolean>
infix fun Expression<Boolean>.or(op: Expression<Boolean>): Op<Boolean>

Returns the result of performing a logical `or` operation between this expression and the op.

orIfNotNull
Link copied to clipboard
inline fun Op<Boolean>.orIfNotNull(op: () -> Op<Boolean>?): Op<Boolean>
infix fun Op<Boolean>.orIfNotNull(op: Expression<Boolean>?): Op<Boolean>

Returns the result of performing a logical `or` operation between this expression and the op if op is not null. Otherwise, this expression will be returned.

orNot
Link copied to clipboard
inline fun Expression<Boolean>.orNot(op: () -> Op<Boolean>): Op<Boolean>

Returns the result of performing a logical `or` operation between this expression and the negate op.

percentRank
Link copied to clipboard
fun percentRank(): PercentRank

Returns the relative rank of the current row, that is (rank - 1) / (total partition rows - 1). The value thus ranges from 0 to 1 inclusive.

plus
Link copied to clipboard
infix operator fun String.plus(value: Expression<String>): Concat
infix operator fun Expression<String>.plus(value: String): Concat
infix operator fun Expression<String>.plus(value: Expression<String>): Concat

Concatenate the value to the input expression.

infix operator fun <T> ExpressionWithColumnType<T>.plus(t: T): PlusOp<T, T>

Adds the t value to this expression.

infix operator fun <T, S : T> ExpressionWithColumnType<T>.plus(other: Expression<S>): PlusOp<T, S>

Adds the other expression to this expression.

rank
Link copied to clipboard
fun rank(): Rank

Returns the rank of the current row, with gaps; that is, the row_number of the first row in its peer group.

regexp
Link copied to clipboard
infix fun <T : String?> Expression<T>.regexp(pattern: String): RegexpOp<T>
fun <T : String?> Expression<T>.regexp(pattern: Expression<String>, caseSensitive: Boolean = true): RegexpOp<T>

Checks if this expression matches the pattern. Supports regular expressions.

rem
Link copied to clipboard
infix operator fun <T : Number?, S : T> ExpressionWithColumnType<T>.rem(t: S): ModOp<T, S, T>

Calculates the remainder of dividing this expression by the t value.

infix operator fun <T : Number?, S : Number> ExpressionWithColumnType<T>.rem(other: Expression<S>): ModOp<T, S, T>

Calculates the remainder of dividing this expression by the other expression.

@JvmName(name = "remWithEntityId")
infix operator fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> ExpressionWithColumnType<ID>.rem(other: S): ExpressionWithColumnType<T>

Calculates the remainder of dividing the value of this numeric PK by the other number.

@JvmName(name = "remWithEntityId3")
infix operator fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> ExpressionWithColumnType<ID>.rem(other: Expression<S>): ExpressionWithColumnType<T>

Calculates the remainder of dividing the value of this numeric PK by the other number expression.

@JvmName(name = "remWithEntityId2")
infix operator fun <T : Number, Comparable<T>, S : Number, ID : EntityID<T>?> Expression<S>.rem(other: ExpressionWithColumnType<ID>): ExpressionWithColumnType<T>

Calculates the remainder of dividing this number expression by other numeric PK

rightJoin
Link copied to clipboard
fun <C1 : ColumnSet, C2 : ColumnSet> C1.rightJoin(otherTable: C2, onColumn: C1.() -> Expression<*>? = null, otherColumn: C2.() -> Expression<*>? = null, additionalConstraint: () -> Op<Boolean>? = null): Join

Creates a right outer join relation with otherTable using onColumn and otherColumn equality and/or additionalConstraint as the join condition.

rowNumber
Link copied to clipboard
fun rowNumber(): RowNumber

Returns the number of the current row within its partition, counting from 1.

shortLiteral
Link copied to clipboard
fun shortLiteral(value: Short): LiteralOp<Short>

Returns the specified value as a short literal.

shortParam
Link copied to clipboard
fun shortParam(value: Short): Expression<Short>

Returns the specified value as a short query parameter.

slice
Link copied to clipboard
fun <E, T : List<E>?> ExpressionWithColumnType<T>.slice(lower: Int? = null, upper: Int? = null): ArraySlice<E, T>

Returns a subarray of elements stored from between lower and upper bounds (inclusive), or `null` if the stored array itself is null. Note If either bounds is left `null`, the database will use the stored array's respective lower or upper limit.

stdDevPop
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.stdDevPop(scale: Int = 2): StdDevPop<T>

Returns the population standard deviation of the non-null input values, or `null` if there are no non-null values.

stdDevSamp
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.stdDevSamp(scale: Int = 2): StdDevSamp<T>

Returns the sample standard deviation of the non-null input values, or `null` if there are no non-null values.

stringLiteral
Link copied to clipboard
fun stringLiteral(value: String): LiteralOp<String>

Returns the specified value as a string literal.

stringParam
Link copied to clipboard
fun stringParam(value: String): Expression<String>

Returns the specified value as a string query parameter.

substring
Link copied to clipboard
fun <T : String?> Expression<T>.substring(start: Int, length: Int): Substring<T>

Extract a substring from this string expression that begins at the specified start and with the specified length.

sum
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.sum(): Sum<T>

Returns the sum of this expression across all non-null input values, or `null` if there are no non-null values.

targetTables
Link copied to clipboard
fun ColumnSet.targetTables(): List<Table>

Returns the list of tables to which the columns in this column set belong.

times
Link copied to clipboard
infix operator fun <T> ExpressionWithColumnType<T>.times(t: T): TimesOp<T, T>

Multiplies this expression by the t value.

infix operator fun <T, S : T> ExpressionWithColumnType<T>.times(other: Expression<S>): TimesOp<T, S>

Multiplies this expression by the other expression.

trim
Link copied to clipboard
fun <T : String?> Expression<T>.trim(): Trim<T>

Removes the longest string containing only spaces from both ends of string expression.

ubyteLiteral
Link copied to clipboard
fun ubyteLiteral(value: UByte): LiteralOp<UByte>

Returns the specified value as a unsigned byte literal.

ubyteParam
Link copied to clipboard
fun ubyteParam(value: UByte): Expression<UByte>

Returns the specified value as a unsigned byte query parameter.

uintLiteral
Link copied to clipboard
fun uintLiteral(value: UInt): LiteralOp<UInt>

Returns the specified value as a unsigned int literal.

uintParam
Link copied to clipboard
fun uintParam(value: UInt): Expression<UInt>

Returns the specified value as a unsigned int query parameter.

ulongLiteral
Link copied to clipboard
fun ulongLiteral(value: ULong): LiteralOp<ULong>

Returns the specified value as a unsigned long literal.

ulongParam
Link copied to clipboard
fun ulongParam(value: ULong): Expression<ULong>

Returns the specified value as a unsigned long query parameter.

upperCase
Link copied to clipboard
fun <T : String?> Expression<T>.upperCase(): UpperCase<T>

Converts this string expression to upper case.

ushortLiteral
Link copied to clipboard
fun ushortLiteral(value: UShort): LiteralOp<UShort>

Returns the specified value as a unsigned short literal.

ushortParam
Link copied to clipboard
fun ushortParam(value: UShort): Expression<UShort>

Returns the specified value as a unsigned short query parameter.

varPop
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.varPop(scale: Int = 2): VarPop<T>

Returns the population variance of the non-null input values (square of the population standard deviation), or `null` if there are no non-null values.

varSamp
Link copied to clipboard
fun <T> ExpressionWithColumnType<T>.varSamp(scale: Int = 2): VarSamp<T>

Returns the sample variance of the non-null input values (square of the sample standard deviation), or `null` if there are no non-null values.

vectorLiteral
Link copied to clipboard
fun vectorLiteral(value: FloatArray): LiteralOp<FloatArray>
fun vectorLiteral(value: IntArray): LiteralOp<IntArray>

Returns the specified value as a string literal.

vectorParam
Link copied to clipboard
fun vectorParam(value: FloatArray): Expression<FloatArray>
fun vectorParam(value: IntArray): Expression<IntArray>

Returns the specified value as a string query parameter.

wrap
Link copied to clipboard
fun <T, S : T?> ExpressionWithColumnType<in S>.wrap(value: T): QueryParameter<T>

Returns the specified value as a query parameter of type T.

wrapAsExpression
Link copied to clipboard
fun <T : Any> wrapAsExpression(query: AbstractQuery<*>): Expression<T?>

Wraps a query as an Expression so that it can be used as part of an SQL statement or in another query clause.