DatabaseObjectExistsException
extends ServerException
in package
Base class for all already existing database object related errors detected in the driver.
A database object is considered any asset that can be created in a database such as schemas, tables, views, sequences, triggers, constraints, indexes, functions, stored procedures etc.
Tags
Table of Contents
- $driverException : DriverException
- The previous DBAL driver exception.
- __construct() : mixed
- Constructor.
- driverException() : DBALException
- driverExceptionDuringQuery() : DBALException
- driverRequired() : DBALException
- getErrorCode() : int|string|null
- Returns the driver specific error code if given.
- getSQLState() : string|null
- Returns the SQLSTATE the driver was in at the time the error occurred, if given.
- invalidDriverClass() : DBALException
- invalidPdoInstance() : DBALException
- invalidPlatformSpecified() : DBALException
- invalidPlatformVersionSpecified() : DBALException
- Returns a new instance for an invalid specified platform version.
- invalidTableName() : DBALException
- invalidWrapperClass() : DBALException
- limitOffsetInvalid() : DBALException
- noColumnsSpecifiedForTable() : DBALException
- notSupported() : DBALException
- typeExists() : DBALException
- typeNotFound() : DBALException
- unknownColumnType() : DBALException
- unknownDriver() : DBALException
- formatParameters() : string
- Returns a human-readable representation of an array of parameters.
Properties
$driverException
The previous DBAL driver exception.
private
DriverException
$driverException
Methods
__construct()
Constructor.
public
__construct(string $message, DriverException $driverException) : mixed
Parameters
- $message : string
-
The exception message.
- $driverException : DriverException
-
The DBAL driver exception to chain.
Return values
mixed —driverException()
public
static driverException(Driver $driver, Exception $driverEx) : DBALException
Parameters
- $driver : Driver
- $driverEx : Exception
Return values
DBALException —driverExceptionDuringQuery()
public
static driverExceptionDuringQuery(Driver $driver, Exception $driverEx, string $sql[, array<string|int, mixed> $params = array() ]) : DBALException
Parameters
- $driver : Driver
- $driverEx : Exception
- $sql : string
- $params : array<string|int, mixed> = array()
Return values
DBALException —driverRequired()
public
static driverRequired([string|null $url = null ]) : DBALException
Parameters
- $url : string|null = null
-
The URL that was provided in the connection parameters (if any).
Return values
DBALException —getErrorCode()
Returns the driver specific error code if given.
public
getErrorCode() : int|string|null
Returns null if no error code was given by the driver.
Return values
int|string|null —getSQLState()
Returns the SQLSTATE the driver was in at the time the error occurred, if given.
public
getSQLState() : string|null
Returns null if no SQLSTATE was given by the driver.
Return values
string|null —invalidDriverClass()
public
static invalidDriverClass(string $driverClass) : DBALException
Parameters
- $driverClass : string
Return values
DBALException —invalidPdoInstance()
public
static invalidPdoInstance() : DBALException
Return values
DBALException —invalidPlatformSpecified()
public
static invalidPlatformSpecified() : DBALException
Return values
DBALException —invalidPlatformVersionSpecified()
Returns a new instance for an invalid specified platform version.
public
static invalidPlatformVersionSpecified(string $version, string $expectedFormat) : DBALException
Parameters
- $version : string
-
The invalid platform version given.
- $expectedFormat : string
-
The expected platform version format.
Return values
DBALException —invalidTableName()
public
static invalidTableName(string $tableName) : DBALException
Parameters
- $tableName : string
Return values
DBALException —invalidWrapperClass()
public
static invalidWrapperClass(string $wrapperClass) : DBALException
Parameters
- $wrapperClass : string
Return values
DBALException —limitOffsetInvalid()
public
static limitOffsetInvalid() : DBALException
Return values
DBALException —noColumnsSpecifiedForTable()
public
static noColumnsSpecifiedForTable(string $tableName) : DBALException
Parameters
- $tableName : string
Return values
DBALException —notSupported()
public
static notSupported(string $method) : DBALException
Parameters
- $method : string
Return values
DBALException —typeExists()
public
static typeExists(string $name) : DBALException
Parameters
- $name : string
Return values
DBALException —typeNotFound()
public
static typeNotFound(string $name) : DBALException
Parameters
- $name : string
Return values
DBALException —unknownColumnType()
public
static unknownColumnType(string $name) : DBALException
Parameters
- $name : string
Return values
DBALException —unknownDriver()
public
static unknownDriver(string $unknownDriverName, array<string|int, mixed> $knownDrivers) : DBALException
Parameters
- $unknownDriverName : string
- $knownDrivers : array<string|int, mixed>
Return values
DBALException —formatParameters()
Returns a human-readable representation of an array of parameters.
private
static formatParameters(array<string|int, mixed> $params) : string
This properly handles binary data by returning a hex representation.
Parameters
- $params : array<string|int, mixed>