public function __construct(Connection $connection, Model $model) { $this->model = $model; $this->connection = $connection; $compiler = $connection->compiler(); $query = new Select($compiler, $model->getTable()); $whereCondition = new WhereCondition($this, $query); parent::__construct($compiler, $query, $whereCondition); }
/** * Constructor * * @param Connection $connection * @param string|array $table */ public function __construct(Connection $connection, $table) { parent::__construct($connection->compiler(), $table); $this->connection = $connection; }
public function __construct(Connection $connection, array $values) { parent::__construct($connection->compiler()); $this->connection = $connection; $this->insert($values); }