示例#1
0
文件: Query.php 项目: smnDev/pheeca
 /**
  * Aggiunge una clause alla query. Se $clause è una clause viene aggiunta così com'è,
  * se è una stringa viene richiamata la Clause più vicina al driver indicato per la query
  * e passa $params al costruttore
  * @param String|Clause $clause
  * @param Array $params
  * @return self
  */
 public function addClause($clause, $params = array())
 {
     if ($clause instanceof Clause) {
         $name = $clause->getName();
         $this->_clauseList[$name] = $clause;
     } else {
         $instance = Database::getClauseClassInstanceFromConnectionName($clause, $this->getConnectionName());
         $instance->initData($params);
         $this->_clauseList[$clause] = $instance;
     }
     return $this;
 }
示例#2
0
文件: From.php 项目: smnDev/pheeca
 public function __construct($fields = '', $prefix = '', $suffix = '')
 {
     if (is_string($fields)) {
         $fields = array($fields);
     }
     parent::__construct(['prefix' => $prefix, 'data' => $fields, 'suffix' => $suffix]);
 }
示例#3
0
文件: Having.php 项目: smnDev/pheeca
 public function __construct($condition = array(), $prefix = '', $suffix = '')
 {
     parent::__construct(['prefix' => $prefix, 'data' => $condition, 'suffix' => $suffix]);
     //$this->_condition[] = $condition;
     $this->_uniquePrefixBindParams = uniqid();
 }
示例#4
0
文件: Insert.php 项目: smnDev/pheeca
 public function __construct($values, $prefix = '', $suffix = '')
 {
     parent::__construct(['prefix' => $prefix, 'data' => $values, 'suffix' => $suffix]);
     $this->processFields();
 }
示例#5
0
文件: Delete.php 项目: smnDev/pheeca
 public function __construct($values, $prefix = '', $suffix = '')
 {
     parent::__construct(['prefix' => $prefix, 'data' => $values, 'suffix' => $suffix]);
 }
示例#6
0
文件: Limit.php 项目: smnDev/pheeca
 /**
  * Imposta il numero di righe da visualizzare in una query
  * $number indica da quale riga della query partire, mentre invece $page
  * indica il numero di righe.
  * Se $number = 0 e $page = 5, verranno restituite le prime 5. Se $number = 1
  * e $page = 5, verranno restituite le righe a partire dalla 2 alla 6 (6 compresa).
  * @param Int $number
  * @param Int $page
  * @param Mixed $prefix
  * @param Mixed $suffix
  */
 public function __construct($number = 0, $page = 0, $prefix = '', $suffix = '')
 {
     $data = array('number' => $number, 'page' => $page);
     parent::__construct(array('prefix' => $prefix, 'data' => $data, 'suffix' => $suffix));
 }
示例#7
0
文件: Call.php 项目: smnDev/pheeca
 public function __construct($procedure_name = '', $bind_parameters = null, $return_parameters = null, $suffix = '', $prefix = '')
 {
     parent::__construct(['prefix' => $prefix, 'data' => $procedure_name, 'suffix' => $suffix]);
     $this->_bind_params = $bind_parameters;
 }
示例#8
0
文件: GroupBy.php 项目: smnDev/pheeca
 public function __construct($fields = array('*'), $prefix = '', $suffix = '')
 {
     parent::__construct(['prefix' => $prefix, 'data' => $fields, 'suffix' => $suffix]);
 }