class QueryException extends PDOException (View source)

Properties

protected string $sql

The SQL for the query.

protected array $bindings

The bindings for the query.

Methods

void
__construct(string $sql, array $bindings, Throwable $previous)

Create a new query exception instance.

string
formatMessage(string $sql, array $bindings, Throwable $previous)

Format the SQL error message.

string
getSql()

Get the SQL for the query.

array
getBindings()

Get the bindings for the query.

Details

void __construct(string $sql, array $bindings, Throwable $previous)

Create a new query exception instance.

Parameters

string $sql
array $bindings
Throwable $previous

Return Value

void

protected string formatMessage(string $sql, array $bindings, Throwable $previous)

Format the SQL error message.

Parameters

string $sql
array $bindings
Throwable $previous

Return Value

string

string getSql()

Get the SQL for the query.

Return Value

string

array getBindings()

Get the bindings for the query.

Return Value

array

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.