values

abstract fun values(vararg args: Any?): InsertStatement<T>

Specifies the values for the INSERT statement as a list of arguments.

This function provides a concise way to insert a single row when the order of values matches the order of columns specified when creating the InsertStatement. It is an alternative to using the bind block.

The number of arguments provided to values must match the number of columns specified in the insert call.

Example:

// INSERT INTO Artists (artistId, artistName) VALUES (3, 'A Good Band');
Artists.insert(Artists.artistId, Artists.artistName).use { statement ->
statement.values(3, "A Good Band").execute()
}

Return

This InsertStatement instance, allowing for method chaining.

Author

MOHAMMAD AZIM ANSARI

Parameters

args

Values to be inserted, corresponding to the columns.

See also

Throws

if the number of values does not match the number of columns specified for the insert.