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