manage properties where they belong
[m6w6/pq-gateway] / lib / pq / Query / Expressible.php
index dc2db66fdfffacd62ad9bfaca65fb58850d2c167..d123d8d8cc5fc2ea0816f282f6452d217e6af6ba 100644 (file)
@@ -4,12 +4,22 @@ namespace pq\Query;
 
 class Expressible implements ExpressibleInterface
 {
+       /**
+        * @var string
+        */
+       protected $name;
+       
        /**
         * @var mixed
         */
        protected $data;
        
-       function __construct($data) {
+       /**
+        * @param string $name
+        * @param mixed $data
+        */
+       function __construct($name, $data) {
+               $this->name = $name;
                $this->data = $data;
        }
        
@@ -63,9 +73,6 @@ class Expressible implements ExpressibleInterface
                } elseif (!isset($op) && is_numeric($data)) {
                        $this->data->add(new Expr("+ $data"));
                } else {
-                       if (!is_array($data)) {
-                               $data = $this->row->getTable()->getConnection()->quote($data);
-                       }
                        $this->data->add(new Expr("%s %s", isset($op) ? $op : "||", $data));
                }