Package-level declarations

Types

Link copied to clipboard
data class BulkInsertExpression(val table: TableExpression, val assignments: List<List<ColumnAssignmentExpression<*>>>, val conflictColumns: List<ColumnExpression<*>> = emptyList(), val updateAssignments: List<ColumnAssignmentExpression<*>> = emptyList(), val where: ScalarExpression<Boolean>? = null, val returningColumns: List<ColumnExpression<*>> = emptyList(), val isLeafNode: Boolean = false, val extraProperties: Map<String, Any> = emptyMap()) : SqlExpression

Bulk insert expression, represents a bulk insert statement in SQLite.

Link copied to clipboard

DSL builder for bulk insert or update statements.

Link copied to clipboard
open class BulkInsertStatementBuilder<T : BaseTable<*>>(table: T)

DSL builder for bulk insert statements.

Link copied to clipboard
data class InsertOrUpdateExpression(val table: TableExpression, val assignments: List<ColumnAssignmentExpression<*>>, val conflictColumns: List<ColumnExpression<*>> = emptyList(), val updateAssignments: List<ColumnAssignmentExpression<*>> = emptyList(), val where: ScalarExpression<Boolean>? = null, val returningColumns: List<ColumnExpression<*>> = emptyList(), val isLeafNode: Boolean = false, val extraProperties: Map<String, Any> = emptyMap()) : SqlExpression

Insert or update expression, represents an insert statement with an on conflict (key) do update set clause in SQLite.

Link copied to clipboard

DSL builder for insert or update on conflict clause.

Link copied to clipboard

DSL builder for insert or update statements.

Link copied to clipboard

Base class of SQLite DSL builders, provide basic functions used to build assignments for insert or update DSL.

Link copied to clipboard

SqlDialect implementation for SQLite database.

Link copied to clipboard

Base interface designed to visit or modify SQLite expression trees using visitor pattern.

Link copied to clipboard
open class SQLiteFormatter(database: Database, beautifySql: Boolean, indentSize: Int) : SqlFormatter, SQLiteExpressionVisitor

SqlFormatter implementation for SQLite, formatting SQL expressions as strings with their execution arguments.

Functions

Link copied to clipboard
fun <T : BaseTable<*>> Database.bulkInsert(table: T, block: BulkInsertStatementBuilder<T>.(T) -> Unit): Int

Bulk insert records to the table and return the effected row count.

Link copied to clipboard

Bulk insert records to the table, determining if there is a key conflict while inserting each of them, and automatically performs updates if any conflict exists.

Link copied to clipboard

Bulk insert records to the table, determining if there is a key conflict while inserting each of them, automatically performs updates if any conflict exists, and finally returns the specific columns.

Bulk insert records to the table, determining if there is a key conflict while inserting each of them, automatically performs updates if any conflict exists, and finally returns the specific column.

Link copied to clipboard
fun <T : BaseTable<*>, C1 : Any, C2 : Any> Database.bulkInsertReturning(table: T, returning: Pair<Column<C1>, Column<C2>>, block: BulkInsertStatementBuilder<T>.(T) -> Unit): List<Pair<C1?, C2?>>
fun <T : BaseTable<*>, C1 : Any, C2 : Any, C3 : Any> Database.bulkInsertReturning(table: T, returning: Triple<Column<C1>, Column<C2>, Column<C3>>, block: BulkInsertStatementBuilder<T>.(T) -> Unit): List<Triple<C1?, C2?, C3?>>

Bulk insert records to the table and return the specific columns' values.

fun <T : BaseTable<*>, C : Any> Database.bulkInsertReturning(table: T, returning: Column<C>, block: BulkInsertStatementBuilder<T>.(T) -> Unit): List<C?>

Bulk insert records to the table and return the specific column's values.

Link copied to clipboard

SQLite ifnull function, translated to ifnull(left, right).

Link copied to clipboard
fun <T : Any> iif(condition: ColumnDeclaring<Boolean>, then: ColumnDeclaring<T>, otherwise: ColumnDeclaring<T>): FunctionExpression<T>
inline fun <T : Any> iif(condition: ColumnDeclaring<Boolean>, then: T, otherwise: T, sqlType: SqlType<T> = SqlType.of() ?: error("Cannot detect the param's SqlType, please specify manually.")): FunctionExpression<T>

SQLite iif function, translated to iif(condition, then, otherwise).

Link copied to clipboard

Insert a record to the table, determining if there is a key conflict while it's being inserted, and automatically performs an update if any conflict exists.

Link copied to clipboard
fun <T : BaseTable<*>, C1 : Any, C2 : Any> Database.insertOrUpdateReturning(table: T, returning: Pair<Column<C1>, Column<C2>>, block: InsertOrUpdateStatementBuilder.(T) -> Unit): Pair<C1?, C2?>
fun <T : BaseTable<*>, C1 : Any, C2 : Any, C3 : Any> Database.insertOrUpdateReturning(table: T, returning: Triple<Column<C1>, Column<C2>, Column<C3>>, block: InsertOrUpdateStatementBuilder.(T) -> Unit): Triple<C1?, C2?, C3?>

Insert a record to the table, determining if there is a key conflict while it's being inserted, automatically performs an update if any conflict exists, and finally returns the specific columns.

fun <T : BaseTable<*>, C : Any> Database.insertOrUpdateReturning(table: T, returning: Column<C>, block: InsertOrUpdateStatementBuilder.(T) -> Unit): C?

Insert a record to the table, determining if there is a key conflict while it's being inserted, automatically performs an update if any conflict exists, and finally returns the specific column.

Link copied to clipboard
fun <T : BaseTable<*>, C1 : Any, C2 : Any> Database.insertReturning(table: T, returning: Pair<Column<C1>, Column<C2>>, block: AssignmentsBuilder.(T) -> Unit): Pair<C1?, C2?>
fun <T : BaseTable<*>, C1 : Any, C2 : Any, C3 : Any> Database.insertReturning(table: T, returning: Triple<Column<C1>, Column<C2>, Column<C3>>, block: AssignmentsBuilder.(T) -> Unit): Triple<C1?, C2?, C3?>

Insert a record to the table and return the specific columns.

fun <T : BaseTable<*>, C : Any> Database.insertReturning(table: T, returning: Column<C>, block: AssignmentsBuilder.(T) -> Unit): C?

Insert a record to the table and return the specific column.

Link copied to clipboard

SQLite instr function, translated to instr(left, right).

Link copied to clipboard
inline fun <T : Any> ColumnDeclaring<*>.jsonExtract(path: String, sqlType: SqlType<T> = SqlType.of() ?: error("Cannot detect the result's SqlType, please specify manually.")): FunctionExpression<T>

SQLite json_extract function, translated to json_extract(column, path).

Link copied to clipboard

SQLite json_patch function, translated to json_patch(left, right).

Link copied to clipboard

SQLite json_remove function, translated to json_remove(column, path).

Link copied to clipboard

SQLite json_valid function, translated to json_valid(column).

Link copied to clipboard

SQLite random function, translated to random().

Link copied to clipboard

SQLite replace function, translated to replace(str, oldValue, newValue).

Link copied to clipboard

SQLite lower function, translated to lower(str).

Link copied to clipboard

SQLite upper function, translated to upper(str).