6 * A query writer which supports easily constructing queries for \pq\Connection::execParams()
9 interface WriterInterface
12 * Returns the plain constructed query as string
15 function __toString();
18 * Returns a list of parameters as array
24 * Returns a list any types associated with the params
30 * Reset the state of the query writer
31 * @return \pq\Query\WriterInterface
36 * Write plain SQL to the query
37 * @param mixed $arg variable list of arguments, arrays will be imploded to a comma separated list
38 * @return \pq\Query\WriterInterface
40 function write(/*...*/);
43 * Remember the parameter with any associated type and return $N to be written to the query string
44 * @param mixed $param a literal parameter, a \pq\Gateway\Table\Cell or a \pq\Query\Expr
45 * @param int $type the oid of the type of the param
46 * @return \pq\Query\WriterInterface
48 function param($param, $type = null);
51 * An array of AND/OR criteria
52 * @param array $criteria
54 function criteria(array $criteria);