SqlServerConnector
class SqlServerConnector extends Connector implements ConnectorInterface (View source)
Traits
Properties
protected array | $options | The PDO connection options. |
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.
Set the connection transaction isolation level.
Create a DSN string from a configuration.
Determine if the database configuration prefers ODBC.
Get the DSN string for a DbLib connection.
Get the DSN string for an ODBC connection.
Get the DSN string for a SqlSrv connection.
Build a connection string from the given arguments.
Build a host string from the given configuration.
Get the available PDO drivers.
Details
protected bool
causedByLostConnection(Throwable $e)
Determine if the given exception was caused by a lost 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.
protected void
configureIsolationLevel(PDO $connection, array $config)
Set the connection transaction isolation level.
https://learn.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql
protected string
buildConnectString(string $driver, array $arguments)
Build a connection string from the given arguments.