Package-level declarations

Types

Link copied to clipboard
typealias BuildWhere = SqlExpressionBuilder.() -> Op<Boolean>
Link copied to clipboard
class HelperInsertStatement<Key : Any>(table: Table, isIgnore: Boolean = false) : InsertStatement<Key>
Link copied to clipboard
typealias TableAwareBuildWhere<T> = T.() -> Op<Boolean>
typealias TableAwareWithSqlExpressionBuilderBuildWhere<T> = T.(ISqlExpressionBuilder) -> Op<Boolean>
Link copied to clipboard
typealias Where = BuildWhere
Link copied to clipboard
typealias WhereOp = Op<Boolean>

Properties

Link copied to clipboard
val asterisk: LiteralOp<String>

Functions

Link copied to clipboard
fun Table.defaultColumnsForInsertSelect(): List<Column<*>>
Link copied to clipboard
fun Table.deleteAllStatement(): DeleteStatement
Link copied to clipboard
fun <T : Table> T.deleteIgnoreWhereStatement(limit: Int? = null, offset: Long? = null, op: TableAwareWithSqlExpressionBuilderBuildWhere<T>): DeleteStatement

Adapted from org.jetbrains.exposed.sql.deleteWhere.

Link copied to clipboard
fun <T : Table> T.deleteWhereStatement(limit: Int? = null, offset: Long? = null, op: TableAwareWithSqlExpressionBuilderBuildWhere<T>): DeleteStatement
fun Table.deleteWhereStatement(isIgnore: Boolean = false, limit: Int? = null, offset: Long? = null, op: BuildWhere): DeleteStatement

Adapted from org.jetbrains.exposed.sql.deleteWhere.

fun Table.deleteWhereStatement(op: WhereOp, isIgnore: Boolean = false, limit: Int? = null, offset: Long? = null): DeleteStatement
Link copied to clipboard
fun ColumnSet.emptySlice(): FieldSet

To simplify the SQL in some expression queries. For example Dual.slice(exists(Table.emptySlice().select(op))).selectAll() generates a SQL with no columns which is simpler.

Link copied to clipboard
fun <T : Table> T.insertIgnoreStatement(body: T.(InsertStatement<Number>) -> Unit): HelperInsertStatement<Number>

Adapted from org.jetbrains.exposed.sql.insertIgnore.

Link copied to clipboard
fun <T : Table> T.insertSelectStatement(selectQuery: AbstractQuery<*>, columns: List<Column<*>> = defaultColumnsForInsertSelect(), isIgnore: Boolean = false): InsertSelectStatement

Adapted from org.jetbrains.exposed.sql.insert.

Link copied to clipboard
fun <T : Table> T.insertStatement(body: T.(InsertStatement<Number>) -> Unit): HelperInsertStatement<Number>

Adapted from org.jetbrains.exposed.sql.insert.

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

Adapted from org.jetbrains.exposed.sql.replace.

Link copied to clipboard
fun FieldSet.selectAllStatement(): Query

You can also just use selectAll.

Link copied to clipboard
fun ColumnSet.selectEmpty(): Query
Link copied to clipboard
fun ColumnSet.selectStatement(columns: List<Expression<*>>): Query
fun ColumnSet.selectStatement(column: Expression<*>, vararg columns: Expression<*>): Query

You can also just use select.

fun FieldSet.selectStatement(where: BuildWhere): Query
fun FieldSet.selectStatement(where: WhereOp): Query

Adapted from org.jetbrains.exposed.sql.select.

Link copied to clipboard
fun <T : FieldSet> T.selectStatementTableAware(where: TableAwareBuildWhere<T>): Query
Link copied to clipboard
fun <T : Table> T.updateStatement(where: BuildWhere? = null, limit: Int? = null, body: T.(UpdateStatement) -> Unit): UpdateStatement

Adapted from org.jetbrains.exposed.sql.update.

Link copied to clipboard
fun <T : Table> T.updateStatementTableAware(where: TableAwareBuildWhere<T>? = null, limit: Int? = null, body: T.(UpdateStatement) -> Unit): UpdateStatement
Link copied to clipboard
fun <T : Table> T.updateStatementWithWhereOp(where: WhereOp? = null, limit: Int? = null, body: T.(UpdateStatement) -> Unit): UpdateStatement