Query.this

Constructs a new Query object, reusing the last opened connection. Will fail if no connection has been established.

A command string msut be provided, optionally, values can be provided too, but will usually be added later on.

The query internally keeps a list of params that it will be executed with.

Please note that using the Query's empty constructor will NOT set the Query's connection, and the Query will therefore be quite unusable unless you set the connection later.

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

Examples

auto q = Query("SELECT 1::INT");

auto q = Query("SELECT $1::INT", 1);

Meta