SQLiteConnector
class SQLiteConnector extends Connector implements ConnectorInterface
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
in
DetectsLostConnections at line 16
protected bool
causedByLostConnection(Throwable $e)
Determine if the given exception was caused by a lost connection.
in
Connector at line 34
PDO
createConnection(string $dsn, array $config, array $options)
Create a new PDO connection.
in
Connector at line 61
protected PDO
createPdoConnection(string $dsn, string|null $username, string|null $password, array $options)
Create a new PDO connection instance.
in
Connector at line 71
protected PDO
tryAgainIfCausedByLostConnection(Throwable $e, string $dsn, string|null $username, string|null $password, array $options)
Handle an exception that occurred during connect execution.
in
Connector at line 83
array
getOptions(array $config)
Get the PDO options based on the configuration.
in
Connector at line 93
array
getDefaultOptions()
Get the default PDO connection options.
in
Connector at line 101
void
setDefaultOptions(array $options)
Set the default PDO connection options.
in
Connector at line 109
protected int|null
getLockTimeout(array $config)
Get the configured lock timeout in seconds.
at line 19
PDO
connect(array $config)
Establish a database connection.
at line 45
protected string
parseDatabasePath(string $path)
Get the absolute database path.
at line 79
protected void
configurePragmas(PDO $connection, array $config)
Set miscellaneous user-configured pragmas.
at line 93
protected void
configureForeignKeyConstraints(PDO $connection, array $config)
Enable or disable foreign key constraints if configured.
at line 107
protected void
configureBusyTimeout(PDO $connection, array $config)
Set the busy timeout if configured.
at line 119
protected void
configureJournalMode(PDO $connection, array $config)
Set the journal mode if configured.
at line 131
protected void
configureSynchronous(PDO $connection, array $config)
Set the synchronous mode if configured.