Documentation

QueryException extends QueryException
in package

Exception thrown when a database query fails, or gives an empty result set for a query which required a row to be returned

Use karmabunny\pdb\Exceptions\QueryException.

Table of Contents

Properties

$params  : array<string|int, mixed>
$query  : string
$state  : string
The SQLSTATE error code associated with the failed query.

Methods

create()  : static
setParams()  : static
setQuery()  : static
setState()  : static
getSubClass()  : string

Properties

$state

The SQLSTATE error code associated with the failed query.

public string $state = ''

See: https://en.wikipedia.org/wiki/SQLSTATE https://en.wikibooks.org/wiki/Structured_Query_Language/SQLSTATE https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html https://msdn.microsoft.com/en-us/library/ms714687.aspx

Methods

create()

public static create(PDOException $exception) : static
Parameters
$exception : PDOException
Return values
static

setParams()

public setParams(array<string|int, mixed> $params) : static
Parameters
$params : array<string|int, mixed>
Return values
static

setQuery()

public setQuery(string $query) : static
Parameters
$query : string
Return values
static

setState()

public setState(string|int $state) : static
Parameters
$state : string|int
Return values
static

getSubClass()

protected static getSubClass(PDOException $exception) : string
Parameters
$exception : PDOException
Return values
string —

A subclass of QueryException

On this page

Search results