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(ref Connection conn, string command = "", Value[] params = [])
    struct Query
    this
    (
    ,
    string command = ""
    ,
    Value[] params = []
    )

Examples

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

Meta