db9010 / com.jovial.db9010 / ColumnSetter

ColumnSetter

abstract class ColumnSetter

Superclass for statements that can set table columns: UpdateStatement and InsertStatement. This class maintains a list of the columns that have been set, and a code block to set each value.

Constructors

<init>

Superclass for statements that can set table columns: UpdateStatement and InsertStatement. This class maintains a list of the columns that have been set, and a code block to set each value.

ColumnSetter(table: Table)

Functions

set

Set the given column to value.

operator fun <T> set(column: TableColumn<in T>, value: T): Unit

setFromJson

Set zero or more columns from a JSON-friendly map of column names to values, jsonValue. The values are set using PreparedStatement.setObject, or, if null, PreparedStatement.setNull. See also Types.sqlObject.

fun setFromJson(jsonValue: Map<String, Any?>): Unit

setFromLambda

Set the column c, using a code block that operates on a PreparedStatement using the provided column index.

fun <T> setFromLambda(c: TableColumn<in T>, setter: (Int, PreparedStatement) -> Unit): Unit

Inheritors

InsertStatement

An SQL insert statement. See Database.insertInto.

class InsertStatement : ColumnSetter

UpdateStatement

An SQL update statement. See Database.update.

class UpdateStatement : ColumnSetter, ParameterSetter