Commaaa2
This commit is contained in:
21
vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
vendored
Normal file → Executable file
21
vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
vendored
Normal file → Executable file
@@ -3,10 +3,14 @@
|
||||
namespace Illuminate\Database;
|
||||
|
||||
use Doctrine\DBAL\Driver\PDOSqlite\Driver as DoctrineDriver;
|
||||
use Doctrine\DBAL\Version;
|
||||
use Illuminate\Database\PDO\SQLiteDriver;
|
||||
use Illuminate\Database\Query\Grammars\SQLiteGrammar as QueryGrammar;
|
||||
use Illuminate\Database\Query\Processors\SQLiteProcessor;
|
||||
use Illuminate\Database\Schema\Grammars\SQLiteGrammar as SchemaGrammar;
|
||||
use Illuminate\Database\Schema\SQLiteBuilder;
|
||||
use Illuminate\Database\Schema\SqliteSchemaState;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
|
||||
class SQLiteConnection extends Connection
|
||||
{
|
||||
@@ -68,6 +72,19 @@ class SQLiteConnection extends Connection
|
||||
return $this->withTablePrefix(new SchemaGrammar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the schema state for the connection.
|
||||
*
|
||||
* @param \Illuminate\Filesystem\Filesystem|null $files
|
||||
* @param callable|null $processFactory
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function getSchemaState(Filesystem $files = null, callable $processFactory = null)
|
||||
{
|
||||
return new SqliteSchemaState($this, $files, $processFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default post processor instance.
|
||||
*
|
||||
@@ -81,11 +98,11 @@ class SQLiteConnection extends Connection
|
||||
/**
|
||||
* Get the Doctrine DBAL driver.
|
||||
*
|
||||
* @return \Doctrine\DBAL\Driver\PDOSqlite\Driver
|
||||
* @return \Doctrine\DBAL\Driver\PDOSqlite\Driver|\Illuminate\Database\PDO\SQLiteDriver
|
||||
*/
|
||||
protected function getDoctrineDriver()
|
||||
{
|
||||
return new DoctrineDriver;
|
||||
return class_exists(Version::class) ? new DoctrineDriver : new SQLiteDriver;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user