QueryException
class QueryException extends PDOException
Properties
| string|null | $connectionName | The database connection name. |
|
| protected string | $sql | The SQL for the query. |
|
| protected array | $bindings | The bindings for the query. |
|
| null|"read"|"write" | $readWriteType | The connection role used for the executed query. |
|
| protected array | $connectionDetails | The connection details for the query (host, port, database, etc.). |
Methods
Create a new query exception instance.
Format the SQL error message.
Format the connection details for the error message.
Get the connection name for the query.
Get the SQL for the query.
Get the raw SQL representation of the query with embedded bindings.
Get the bindings for the query.
Get information about the connection such as host, port, database, etc.
Details
at line 46
__construct(string|null $connectionName, string $sql, array $bindings, Throwable $previous, array $connectionDetails = [], string|null $readWriteType = null, bool $maskBindings = false)
Create a new query exception instance.
at line 73
protected string
formatMessage(string|null $connectionName, string $sql, array $bindings, Throwable $previous, bool $maskBindings = false)
Format the SQL error message.
at line 90
protected string
formatConnectionDetails()
Format the connection details for the error message.
at line 119
string|null
getConnectionName()
Get the connection name for the query.
at line 127
string
getSql()
Get the SQL for the query.
at line 135
string
getRawSql()
Get the raw SQL representation of the query with embedded bindings.
at line 145
array
getBindings()
Get the bindings for the query.
at line 153
array
getConnectionDetails()
Get information about the connection such as host, port, database, etc.