abstract class AbstractSQLAnywhereDriver implements Driver, ExceptionConverterDriver, VersionAwarePlatformDriver (View source)

Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers.

Methods

convertException(string $message, DriverException $exception)

Converts a given DBAL driver exception into a standardized DBAL driver exception.

createDatabasePlatformForVersion(string $version)

Factory method for creating the appropriate platform instance for the given version.

string
getDatabase(Connection $conn)

Gets the name of the database connected to for this driver.

getDatabasePlatform()

Gets the DatabasePlatform instance that provides all the metadata about the platform this driver connects to.

getSchemaManager(Connection $conn)

Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.

Details

DriverException convertException(string $message, DriverException $exception)

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms it into a unified {@link Doctrine\DBAL\Exception\DriverException} subclass.

Parameters

string $message The DBAL exception message to use.
DriverException $exception The DBAL driver exception to convert.

Return Value

DriverException An instance of one of the DriverException subclasses.

AbstractPlatform createDatabasePlatformForVersion(string $version)

Factory method for creating the appropriate platform instance for the given version.

Parameters

string $version The platform/server version string to evaluate. This should be given in the notation the underlying database vendor uses.

Return Value

AbstractPlatform

Exceptions

DBALException If the given version string could not be evaluated.

string getDatabase(Connection $conn)

Gets the name of the database connected to for this driver.

Parameters

Connection $conn

Return Value

string The name of the database.

AbstractPlatform getDatabasePlatform()

Gets the DatabasePlatform instance that provides all the metadata about the platform this driver connects to.

Return Value

AbstractPlatform The database platform.

AbstractSchemaManager getSchemaManager(Connection $conn)

Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.

Parameters

Connection $conn

Return Value

AbstractSchemaManager