Пример #1
0
 /**
  * UpdateStatement constructor.
  * @param string|array $table
  * @param SQLStatement|null $statement
  */
 public function __construct($table, SQLStatement $statement = null)
 {
     if (!is_array($table)) {
         $table = array($table);
     }
     parent::__construct($statement);
     $this->sql->addTables($table);
 }
Пример #2
0
 /**
  * SelectStatement constructor.
  * @param string|array $tables
  * @param SQLStatement|null $statement
  */
 public function __construct($tables, SQLStatement $statement = null)
 {
     parent::__construct($statement);
     if (!is_array($tables)) {
         $tables = array($tables);
     }
     $this->sql->addTables($tables);
     $this->have = new HavingStatement($this->sql);
 }
Пример #3
0
 /**
  * Constructor
  * 
  * @param   Connection  $connection
  * @param   array       $tables
  */
 public function __construct(Connection $connection, $tables, SQLStatement $statement = null)
 {
     parent::__construct($statement);
     $this->tables = $tables;
     $this->connection = $connection;
 }
Пример #4
0
 /**
  * Query constructor.
  * @param SQLStatement|null $statement
  */
 public function __construct(SQLStatement $statement = null)
 {
     parent::__construct($statement);
     $this->have = new HavingStatement($this->sql);
 }