typo
[m6w6/pq-gateway] / lib / pq / Query / Writer.php
index f326f1ebc86a4e3d4d6808e04f4da3a08dcff66b..6e069450d046332460cae6becb0b71444186ed6d 100644 (file)
@@ -5,7 +5,7 @@ namespace pq\Query;
 /**
  * A very simple query writer used by \pq\Gateway
  */
-class Writer
+class Writer implements WriterInterface
 {
        /**
         * @var string
@@ -94,7 +94,7 @@ class Writer
         * @return string
         */
        function param($param, $type = null) {
-               if ($param instanceof \pq\Gateway\Cell) {
+               if ($param instanceof ExpressibleInterface) {
                        $param = $param->get();
                }
                if ($param instanceof Expr) {
@@ -132,13 +132,4 @@ class Writer
                }
                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());
-       }
 }