Connection.insertR

Inserts the given structure, 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 = "")
    struct Connection
    insertR
    (
    T
    )
    (
    T val
    ,
    string ret = ""
    )
    if (
    !isArray!T
    )
  2. Result insertR(T vals, string ret = "")

Examples

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

Meta