Commaaa2
This commit is contained in:
20
vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
vendored
Normal file → Executable file
20
vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
vendored
Normal file → Executable file
@@ -3,10 +3,14 @@
|
||||
namespace Illuminate\Database;
|
||||
|
||||
use Doctrine\DBAL\Driver\PDOPgSql\Driver as DoctrineDriver;
|
||||
use Doctrine\DBAL\Version;
|
||||
use Illuminate\Database\PDO\PostgresDriver;
|
||||
use Illuminate\Database\Query\Grammars\PostgresGrammar as QueryGrammar;
|
||||
use Illuminate\Database\Query\Processors\PostgresProcessor;
|
||||
use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar;
|
||||
use Illuminate\Database\Schema\PostgresBuilder;
|
||||
use Illuminate\Database\Schema\PostgresSchemaState;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
use PDO;
|
||||
|
||||
class PostgresConnection extends Connection
|
||||
@@ -71,6 +75,18 @@ class PostgresConnection extends Connection
|
||||
return $this->withTablePrefix(new SchemaGrammar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the schema state for the connection.
|
||||
*
|
||||
* @param \Illuminate\Filesystem\Filesystem|null $files
|
||||
* @param callable|null $processFactory
|
||||
* @return \Illuminate\Database\Schema\PostgresSchemaState
|
||||
*/
|
||||
public function getSchemaState(Filesystem $files = null, callable $processFactory = null)
|
||||
{
|
||||
return new PostgresSchemaState($this, $files, $processFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default post processor instance.
|
||||
*
|
||||
@@ -84,10 +100,10 @@ class PostgresConnection extends Connection
|
||||
/**
|
||||
* Get the Doctrine DBAL driver.
|
||||
*
|
||||
* @return \Doctrine\DBAL\Driver\PDOPgSql\Driver
|
||||
* @return \Doctrine\DBAL\Driver\PDOPgSql\Driver|\Illuminate\Database\PDO\PostgresDriver
|
||||
*/
|
||||
protected function getDoctrineDriver()
|
||||
{
|
||||
return new DoctrineDriver;
|
||||
return class_exists(Version::class) ? new DoctrineDriver : new PostgresDriver;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user