PDOXStatement
extends PDOStatement
in package
This is our "improved" version of PDOStatement
If the prepare() fails, this class can fake up methods that mimic a simple failed execute().
$stmt->errorCode()
$stmt->errorInfo()
We also augment the real or fake PDOStatement with these fields:
$stmt->success
$stmt->ellapsed_time
$stmt->errorImplode
$stmt->success is TRUE/FALSE based on the success of the operation to simplify error checking
$stmt->ellapsed_time includes the length of time the query took
$stmt->errorImplode an imploded version of errorInfo suitable for dropping into a log.
The technique for making this override is in the documentation for PDOStatement:
https://www.php.net/manual/en/class.pdostatement.php https://www.php.net/manual/en/pdo.setattribute.php
Table of Contents
Properties
- $ellapsed_time : mixed
- $errorCodeOverride : mixed
- $errorImplode : mixed
- $errorInfoOverride : mixed
- $PDOX : mixed
- $sqlOriginalQuery : mixed
- $sqlQuery : mixed
- $success : mixed
Methods
- errorCode() : string|null
- errorInfo() : array<string|int, mixed>
- __construct() : mixed
Properties
$ellapsed_time
public
mixed
$ellapsed_time
$errorCodeOverride
public
mixed
$errorCodeOverride
= null
$errorImplode
public
mixed
$errorImplode
$errorInfoOverride
public
mixed
$errorInfoOverride
= null
$PDOX
public
mixed
$PDOX
= null
$sqlOriginalQuery
public
mixed
$sqlOriginalQuery
$sqlQuery
public
mixed
$sqlQuery
$success
public
mixed
$success
Methods
errorCode()
public
errorCode() : string|null
Return values
string|nullerrorInfo()
public
errorInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>__construct()
protected
__construct() : mixed