DbSetup-kotlin / com.ninja_squad.dbsetup_kotlin / insertInto

insertInto

inline fun insertInto(table: String, configure: Builder.() -> Unit): Insert

Top-level function allowing to create an Insert operation by passing a lambda expression configuring it.

Example usage:

val insertUsers = insertInto("user") {
    columns("id", "name")
    values(1, "John Doe")
    values(2, "Jane Doe")
}


Parameters

table - the name of the table to insert into

configure - the function used to configure the Insert

Return
the created Insert operation

Author
JB Nizet