Connection.insertR

Inserts the given array structures in a singl query, returning whatever columns are specified by the second param as a normal Result.

Equivalent to specifying RETURNING at the end of the query.

  1. Result insertR(T val, string ret)
  2. Result insertR(T vals, string ret)
    struct Connection
    insertR
    (
    T
    )
    (,
    string ret = ""
    )
    if (
    isArray!T
    )

Examples

Connection c; // an established connection
struct Data { @PK int id, int a; int b; }
Data[2] myData;
auto result = c.insert(myData, "id");

Meta