Example #1
0
 /**
  * Creates a new Delete object. 
  * @param Table $table
  * @param Condition $condition
  * @param OrderList $orderList
  * @param int $offset
  * @param int $count
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Table $table, Condition $condition = null, OrderList $orderList = null, $offset = 0, $count = 0)
 {
     parent::__construct($connection);
     $this->table = $table;
     $this->condition = $condition;
     $this->orderList = $orderList;
     if ($count > 0) {
         $this->offset = (int) $offset;
         $this->count = (int) $count;
     }
 }
Example #2
0
 /**
  * Creates a sql value
  * @param mixed $value A primitive type or a type implementing __toString or null
  * @return Value Returns the sql value
  */
 function Value($value)
 {
     return parent::CreateValue($value);
 }
Example #3
0
 /**
  * Creates a new Set List for inserts and updates. 
  * @param array $fieldValues 
  * @return SetList
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $fieldName, Value $value)
 {
     parent::__construct($connection);
     $this->fieldValues = array($fieldName => $value);
 }
Example #4
0
 /**
  * 
  * @param Selectable $selectable
  * @param $direction One of ASC, DESC
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Selectable $selectable, $direction)
 {
     parent::__construct($connection);
     $this->selectable = $selectable;
     $this->direction = $direction;
 }
Example #5
0
 /**
  * 
  * @param array[Selectable] $selectables
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Selectable $selectable)
 {
     parent::__construct($connection);
     $this->selectables = array($selectable);
 }
Example #6
0
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $statement)
 {
     parent::__construct($connection);
     $this->statement = $statement;
 }
Example #7
0
 function __construct(DBInterfaces\IDatabaseConnection $connection, Table $table, SetList $setList)
 {
     parent::__construct($connection);
     $this->table = $table;
     $this->setList = $setList;
 }
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $alias = '')
 {
     parent::__construct($connection);
     $this->alias = $alias;
 }
Example #9
0
 /**
  * Creats a new SQL order list.
  * @param array[Order] $orders 
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Order $order)
 {
     parent::__construct($connection);
     $this->orders = array($order);
 }