DormDB.insert

Database operation to INSERT a single value or multiple values when a slice is passed into insert.

It's possible to insert full Model instances, in which case every field of the model is used for the insertion. (also the primary key)

It's also possible to insert DormPatch instances to only pass the available fields into the SQL insert statement. This means default values will be auto-generated if possible. (see dorm.declarative.ModelFormat.Field.hasGeneratedDefaultValue)

This is the place where @constructValue constructors are called.

This method can also be used on transactions.

  1. void insert(T value)
    struct DormDB
    @safe
    void
    insert
    (
    T
    )
    ()
    if (
    !is(T == U[],
    U
    )
    )
  2. void insert(T[] value)

Meta