예제 #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;
     }
 }
예제 #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);
 }
예제 #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);
 }
예제 #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;
 }
예제 #5
0
 /**
  * 
  * @param array[Selectable] $selectables
  */
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, Selectable $selectable)
 {
     parent::__construct($connection);
     $this->selectables = array($selectable);
 }
예제 #6
0
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $statement)
 {
     parent::__construct($connection);
     $this->statement = $statement;
 }
예제 #7
0
 function __construct(DBInterfaces\IDatabaseConnection $connection, Table $table, SetList $setList)
 {
     parent::__construct($connection);
     $this->table = $table;
     $this->setList = $setList;
 }
예제 #8
0
 protected function __construct(DBInterfaces\IDatabaseConnection $connection, $alias = '')
 {
     parent::__construct($connection);
     $this->alias = $alias;
 }
예제 #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);
 }