Query.this

Like the above constructor, except it also accepts a Connection as the first param. A copy of the Connection is not made.

  1. this(string command, Value[] params)
  2. this(Connection conn, string command, Value[] params)
    struct Query
    this
    (,
    string command = ""
    ,
    Value[] params = []
    )

Examples

Connection conn; // an established connection
auto q = Query(conn, "SELECT 1::INT");

Connection conn; // an established connection
auto q = Query(conn, "SELECT $1::INT", 1);

Meta