Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 /**
  * Query constructor.
  * @param SQLStatement|null $statement
  */
 public function __construct(SQLStatement $statement = null)
 {
     parent::__construct($statement);
     $this->have = new HavingStatement($this->sql);
 }