class MySqlConnector extends Connector implements ConnectorInterface (View source)
DetectsLostConnections |
protected array | $options | The default PDO connection options. | from Connector |
bool | causedByLostConnection(Throwable $e) Determine if the given exception was caused by a lost connection. | from DetectsLostConnections |
PDO | createConnection(string $dsn, array $config, array $options) Create a new PDO connection. | from Connector |
PDO | createPdoConnection(string $dsn, string $username, string $password, array $options) Create a new PDO connection instance. | from Connector |
bool | isPersistentConnection(array $options) Determine if the connection is persistent. | from Connector |
PDO | tryAgainIfCausedByLostConnection(Throwable $e, string $dsn, string $username, string $password, array $options) Handle an exception that occurred during connect execution. | from Connector |
array | getOptions(array $config) Get the PDO options based on the configuration. | from Connector |
array | getDefaultOptions() Get the default PDO connection options. | from Connector |
void | setDefaultOptions(array $options) Set the default PDO connection options. | from Connector |
PDO | connect(array $config) Establish a database connection. | |
void | configureIsolationLevel(PDO $connection, array $config) Set the connection transaction isolation level. | |
void|PDO | configureEncoding(PDO $connection, array $config) Set the connection character set and collation. | |
string | getCollation(array $config) Get the collation for the configuration. | |
void | configureTimezone(PDO $connection, array $config) Set the timezone on the connection. | |
string | getDsn(array $config) Create a DSN string from a configuration. | |
bool | hasSocket(array $config) Determine if the given configuration array has a UNIX socket value. | |
string | getSocketDsn(array $config) Get the DSN string for a socket configuration. | |
string | getHostDsn(array $config) Get the DSN string for a host / port configuration. | |
void | setModes(PDO $connection, array $config) Set the modes for the connection. | |
void | setCustomModes(PDO $connection, array $config) Set the custom modes on the connection. | |
string | strictMode(PDO $connection, array $config) Get the query to enable strict mode. |
Determine if the given exception was caused by a lost connection.
Create a new PDO connection.
Create a new PDO connection instance.
Determine if the connection is persistent.
Handle an exception that occurred during connect execution.
Get the PDO options based on the configuration.
Get the default PDO connection options.
Set the default PDO connection options.
Establish a database connection.
Set the connection transaction isolation level.
Set the connection character set and collation.
Get the collation for the configuration.
Set the timezone on the connection.
Create a DSN string from a configuration.
Chooses socket or host/port based on the 'unix_socket' config value.
Determine if the given configuration array has a UNIX socket value.
Get the DSN string for a socket configuration.
Get the DSN string for a host / port configuration.
Set the modes for the connection.
Set the custom modes on the connection.
Get the query to enable strict mode.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Connectors/MySqlConnector.html