manage properties where they belong
[m6w6/pq-gateway] / lib / pq / Query / Expressible.php
index ffcf7c2c0f0936d0b693ece11846b85261492156..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,10 +73,9 @@ class Expressible implements ExpressibleInterface
                } elseif (!isset($op) && is_numeric($data)) {
                        $this->data->add(new Expr("+ $data"));
                } else {
-                       $data = $this->row->getTable()->getConnection()->quote($data);
                        $this->data->add(new Expr("%s %s", isset($op) ? $op : "||", $data));
                }
                
                return $this;
-       }               
-}
\ No newline at end of file
+       }
+}