SQLiteConnector
class SQLiteConnector extends Connector implements ConnectorInterface (View source)
Traits
Properties
protected array | $options | The default PDO connection options. |
from Connector |
Methods
Determine if the given exception was caused by a lost connection.
Create a new PDO connection.
Create a new PDO connection instance.
Handle an exception that occurred during connect execution.
Get the absolute database path.
Enable or disable foreign key constraints if configured.
Details
protected bool
causedByLostConnection(Throwable $e)
Determine if the given exception was caused by a lost connection.
PDO
createConnection(string $dsn, array $config, array $options)
Create a new PDO connection.
protected PDO
createPdoConnection(string $dsn, string $username, string $password, array $options)
Create a new PDO connection instance.
protected PDO
tryAgainIfCausedByLostConnection(Throwable $e, string $dsn, string $username, string $password, array $options)
Handle an exception that occurred during connect execution.
array
getOptions(array $config)
Get the PDO options based on the configuration.
array
getDefaultOptions()
Get the default PDO connection options.
void
setDefaultOptions(array $options)
Set the default PDO connection options.
PDO
connect(array $config)
Establish a database connection.
protected string
parseDatabasePath(string $path)
Get the absolute database path.
protected void
configureForeignKeyConstraints(PDO $connection, array $config)
Enable or disable foreign key constraints if configured.
protected void
configureBusyTimeout(PDO $connection, array $config)
Set the busy timeout if configured.
protected void
configureJournalMode(PDO $connection, array $config)
Set the journal mode if configured.
protected void
configureSynchronous(PDO $connection, array $config)
Set the synchronous mode if configured.