/**
* A very simple query writer used by \pq\Gateway
*/
-class Writer
+class Writer implements WriterInterface
{
/**
* @var string
* @return string
*/
function param($param, $type = null) {
- if ($param instanceof \pq\Gateway\Cell) {
+ if ($param instanceof ExpressibleInterface) {
$param = $param->get();
}
if ($param instanceof Expr) {
}
return $this;
}
-
- /**
- * Execute the query through \pq\Connection::execParams($this, $this->params, $this->types)
- * @param \pq\Connection $c
- * @return \pq\Result
- */
- function exec(\pq\Connection $c) {
- return $c->execParams($this, $this->getParams(), $this->getTypes());
- }
}