Connection.insert

Inserts the given array of structures to the DB as one query

  1. bool insert(T val, bool async = false)
  2. int insert(T vals, bool async = false)
    struct Connection
    int
    insert
    (
    T
    )
    (
    ,
    bool async = false
    )
    if (
    isArray!T
    )

Examples

Connection c; // An established connection
struct User {@PK @serial int id; int a }
User[2] myUsers;
c.insert(myUsers);

Meta