Jelix 1.6.40

jDbPDOResultSet extends PDOStatement
in package

a resultset based on PDOStatement for PHP >= 8.0

Tags
subpackage

db

Table of Contents

$_fetchMode  : mixed
$modifier  : array<string|int, callable>
a callback function which will modify on the fly record's value
addModifier()  : mixed
fetch()  : mixed
fetchAll()  : array<string|int, object>
return all results from the statement.
setFetchMode()  : bool
Set the fetch mode.
unescapeBin()  : string
applyModifiers()  : mixed

Properties

$modifier

a callback function which will modify on the fly record's value

protected array<string|int, callable> $modifier = array()
Tags
since
1.1.6

Methods

addModifier()

public addModifier(callable $function) : mixed
Parameters
$function : callable

a callback function the function should accept in parameter the record, and the resulset object

Tags
since
1.1.6
Return values
mixed

fetch()

public fetch([mixed $fetch_style = null ][, mixed $cursor_orientation = PDO::FETCH_ORI_NEXT ], mixed $cursor_offset) : mixed
Parameters
$fetch_style : mixed = null
$cursor_orientation : mixed = PDO::FETCH_ORI_NEXT
$cursor_offset : mixed
Return values
mixed

fetchAll()

return all results from the statement.

public fetchAll([int $fetch_style = null ], mixed ...$args) : array<string|int, object>
Parameters
$fetch_style : int = null
$args : mixed
Return values
array<string|int, object>

list of object which contain all rows

setFetchMode()

Set the fetch mode.

public setFetchMode(int $mode, mixed ...$args) : bool
Parameters
$mode : int

the mode, a PDO::FETCH_* constant

$args : mixed
Return values
bool

true if the fetch mode is ok

unescapeBin()

public unescapeBin(string $text) : string
Parameters
$text : string

a binary string to unescape

Tags
since
1.1.6
Return values
string

the unescaped string

applyModifiers()

protected applyModifiers(mixed $result) : mixed
Parameters
$result : mixed
Return values
mixed

Search results