PreparedStatement
in package
implements
StatementInterface
Description of PreparedStatement
Tags
Table of Contents
Interfaces
Constants
- PH_NAMED = '(?>\\G|[^\\\\]):([a-zA-Z0-9]+)'
- PH_POSIT = '(?>\\G|[^\\\\])([?])(?>$|[^a-zA-Z0-9_\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{02FF}\\x{0370}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])'
Properties
- $connection : SimpleConnectionInterface
- $param : array<string|int, TermInterface>
- $query : string
- $statement : StatementInterface
Methods
- __construct() : mixed
- bindParam() : bool
- bindValue() : bool
- current() : mixed
- execute() : bool
- fetch() : object|array<string|int, mixed>|string|false
- fetchAll() : array<string|int, mixed>
- fetchColumn() : object|bool
- Returns a first column of the next results row.
- key() : scalar
- next() : void
- rewind() : void
- valid() : bool
- escapeValue() : string|null
- getPlaceholderRegex() : string
- getQuery() : string
- parseQuery() : void
Constants
PH_NAMED
public
mixed
PH_NAMED
= '(?>\\G|[^\\\\]):([a-zA-Z0-9]+)'
PH_POSIT
public
mixed
PH_POSIT
= '(?>\\G|[^\\\\])([?])(?>$|[^a-zA-Z0-9_\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{02FF}\\x{0370}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])'
Properties
$connection
private
SimpleConnectionInterface
$connection
$param
private
array<string|int, TermInterface>
$param
= []
$query
private
string
$query
$statement
private
StatementInterface
$statement
Methods
__construct()
public
__construct(string $query, SimpleConnectionInterface $connection) : mixed
Parameters
- $query : string
- $connection : SimpleConnectionInterface
bindParam()
public
bindParam(int|string $parameter, TermInterface &$variable) : bool
Parameters
- $parameter : int|string
- $variable : TermInterface
Return values
boolbindValue()
public
bindValue(int|string $parameter, TermInterface $value) : bool
Parameters
- $parameter : int|string
- $value : TermInterface
Return values
boolcurrent()
public
current() : mixed
execute()
public
execute([array<string|int, mixed> $parameters = [] ]) : bool
Parameters
- $parameters : array<string|int, mixed> = []
Return values
boolfetch()
public
fetch([int $fetchStyle = PDO::FETCH_OBJ ]) : object|array<string|int, mixed>|string|false
Parameters
- $fetchStyle : int = PDO::FETCH_OBJ
Return values
object|array<string|int, mixed>|string|falsefetchAll()
public
fetchAll([int $fetchStyle = PDO::FETCH_OBJ ]) : array<string|int, mixed>
Parameters
- $fetchStyle : int = PDO::FETCH_OBJ
Return values
array<string|int, mixed>fetchColumn()
Returns a first column of the next results row.
public
fetchColumn() : object|bool
If there are no more results returns `false.
Please note false
can be also a valid value of the ASK query.
Return values
object|boolkey()
public
key() : scalar
Return values
scalarnext()
public
next() : void
rewind()
public
rewind() : void
valid()
public
valid() : bool
Return values
boolescapeValue()
private
escapeValue(string $paramName) : string|null
Parameters
- $paramName : string
Return values
string|nullgetPlaceholderRegex()
private
getPlaceholderRegex() : string
Return values
stringgetQuery()
private
getQuery() : string
Return values
stringparseQuery()
private
parseQuery() : void