database refactoring for dependency injection and other general refactoring.
This commit is contained in:
@@ -8,20 +8,20 @@ class Factory {
|
||||
/**
|
||||
* Create a new query instance based on the connection driver.
|
||||
*
|
||||
* @param string $table
|
||||
* @param Connection $connection
|
||||
* @param Compiler $compiler
|
||||
* @param string $table
|
||||
* @return Query
|
||||
*/
|
||||
public static function make($table, Connection $connection, Compiler $compiler)
|
||||
public function make(Connection $connection, Compiler $compiler, $table)
|
||||
{
|
||||
switch ($connection->driver())
|
||||
{
|
||||
case 'pgsql':
|
||||
return new Postgres($table, $connection, $compiler);
|
||||
return new Postgres($connection, $compiler, $table);
|
||||
|
||||
default:
|
||||
return new Query($table, $connection, $compiler);
|
||||
return new Query($connection, $compiler, $table);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user