class InvalidValueException extends QueryException

Properties

string|null $connectionName

The database connection name.

from  QueryException
protected string $sql

The SQL for the query.

from  QueryException
protected array $bindings

The bindings for the query.

from  QueryException
null|"read"|"write" $readWriteType

The connection role used for the executed query.

from  QueryException
protected array $connectionDetails

The connection details for the query (host, port, database, etc.).

from  QueryException

Methods

__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.

string
formatMessage(string|null $connectionName, string $sql, array $bindings, Throwable $previous, bool $maskBindings = false)

Format the SQL error message.

string
formatConnectionDetails()

Format the connection details for the error message.

string|null
getConnectionName()

Get the connection name for the query.

string
getSql()

Get the SQL for the query.

string
getRawSql()

Get the raw SQL representation of the query with embedded bindings.

array
getBindings()

Get the bindings for the query.

array
getConnectionDetails()

Get information about the connection such as host, port, database, etc.

Details

in QueryException 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.

Parameters

string|null $connectionName
string $sql
array $bindings
Throwable $previous
array $connectionDetails
string|null $readWriteType
bool $maskBindings

in QueryException at line 73
protected string formatMessage(string|null $connectionName, string $sql, array $bindings, Throwable $previous, bool $maskBindings = false)

Format the SQL error message.

Parameters

string|null $connectionName
string $sql
array $bindings
Throwable $previous
bool $maskBindings

Return Value

string

in QueryException at line 90
protected string formatConnectionDetails()

Format the connection details for the error message.

Return Value

string

in QueryException at line 119
string|null getConnectionName()

Get the connection name for the query.

Return Value

string|null

in QueryException at line 127
string getSql()

Get the SQL for the query.

Return Value

string

in QueryException at line 135
string getRawSql()

Get the raw SQL representation of the query with embedded bindings.

Return Value

string

in QueryException at line 145
array getBindings()

Get the bindings for the query.

Return Value

array

in QueryException at line 153
array getConnectionDetails()

Get information about the connection such as host, port, database, etc.

Return Value

array