insert

Creates an abstracted INSERT query for inserting row(s) into the specified table filling the passed columns

Insert insertMountain = table("mountain").insert(
    "name",
    "location",
    "height"
);
// INSERT INTO "mountain"("name", "location", "height") VALUES (?, ?, ?)

Insert insert3MountainsAtOnce = table("mountain")
    .insert(
        "name",
        "height"
    )
    .times(3)
;
// INSERT INTO "mountain"("name", "height") VALUES (?, ?), (?, ?), (?, ?)
  1. Insert insert(Table table, const(string)[] columns)
  2. Insert insert(Table table, Columns columns)
    @safe pure
    insert
    (
    Columns...
    )
    (,
    Columns columns
    )

See Also

Use times to create a query for inserting multiple rows at once.

Meta