Bind
An interface that defines the binding of values with ? to handle safely. Typically used within the context of INSERT or UPDATE statements.
This interface acts as a receiver scope for lambda expressions in operations like com.kqlite.statement.quickInsert or com.kqlite.statement.quickUpdate, providing a DSL for associating values with their respective columns in a type-safe manner. Each bind function maps a column to a specific value that will be used by underlying driver.
Note: Only primitive values and literals user ? bind args. Functions are inserted without binding args.
Example
// INSERT INTO Artists (ArtistId, ArtistName) VALUES (?, ?)
Artists.quickInsert { // 'it' is implicitly of type table 'Artists'
it.artistId.bind(1)
it.artistName.bind("John Doe")
}Author
MOHAMMAD AZIM ANSARI
See also
Functions
Binds the result of a SelectStatement to this column.
Binds a literal value using ? to this column.
Binds the value of another column or function to this column.