Methods |
public
static
|
ensure(ResultStatement $stmt): Result
|
#
|
public
|
__construct(ResultStatement $stmt)
|
#
|
public
|
getIterator(): ResultStatement
|
#
|
public
|
closeCursor()
{@inheritDoc}
Deprecated
Use Result::free() instead.
Returns
TRUE on success or FALSE on failure.
Implements
|
#
|
public
|
columnCount()
{@inheritDoc}
Returns
The number of columns in the result set represented
by the PDOStatement object. If there is no result set,
this method should return 0.
Implements
|
#
|
public
|
setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{@inheritDoc}
Deprecated
Use one of the fetch- or iterate-related methods.
Parameters
$fetchMode |
The fetch mode must be one of the {@link FetchMode} constants.
|
Implements
|
#
|
public
|
fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{@inheritDoc}
Deprecated
Use fetchNumeric(), fetchAssociative() or fetchOne() instead.
Parameters
$fetchMode |
Controls how the next row will be returned to the caller.
The value must be one of the {@link FetchMode} constants,
defaulting to {@link FetchMode::MIXED}.
|
$cursorOrientation |
For a ResultStatement object representing a scrollable cursor,
this value determines which row will be returned to the caller.
This value must be one of the \PDO::FETCH_ORI_* constants,
defaulting to \PDO::FETCH_ORI_NEXT. To request a scrollable
cursor for your ResultStatement object, you must set the \PDO::ATTR_CURSOR
attribute to \PDO::CURSOR_SCROLL when you prepare the SQL statement with
\PDO::prepare().
|
$cursorOffset |
For a ResultStatement object representing a scrollable cursor for which the
cursorOrientation parameter is set to \PDO::FETCH_ORI_ABS, this value
specifies the absolute number of the row in the result set that shall be
fetched.
For a ResultStatement object representing a scrollable cursor for which the
cursorOrientation parameter is set to \PDO::FETCH_ORI_REL, this value
specifies the row to fetch relative to the cursor position before
ResultStatement::fetch() was called.
|
Returns
The return value of this method on success depends on the fetch mode. In all cases, FALSE is
returned on failure.
Implements
|
#
|
public
|
fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{@inheritDoc}
Deprecated
Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.
Parameters
$fetchMode |
Controls how the next row will be returned to the caller.
The value must be one of the {@link FetchMode} constants,
defaulting to {@link FetchMode::MIXED}.
|
$fetchArgument |
This argument has a different meaning depending on the value
of the $fetchMode parameter:
* {@link FetchMode::COLUMN}:
Returns the indicated 0-indexed column.
* {@link FetchMode::CUSTOM_OBJECT}:
Returns instances of the specified class, mapping the columns of each row
to named properties in the class.
* {@link PDO::FETCH_FUNC}: Returns the results of calling
the specified function, using each row's
columns as parameters in the call.
|
$ctorArgs |
Controls how the next row will be returned to the caller.
The value must be one of the {@link FetchMode} constants,
defaulting to {@link FetchMode::MIXED}.
|
Implements
|
#
|
public
|
fetchColumn($columnIndex = 0)
{@inheritDoc}
Deprecated
Parameters
$columnIndex |
0-indexed number of the column you wish to retrieve from the row.
If no value is supplied, fetches the first column.
|
Returns
A single column in the next row of a result set, or FALSE if there are no more rows.
Implements
|
#
|
public
|
fetchNumeric()
{@inheritDoc}
|
#
|
public
|
fetchAssociative()
{@inheritDoc}
|
#
|
public
|
fetchOne()
{@inheritDoc}
|
#
|
public
|
fetchAllNumeric(): array
{@inheritDoc}
|
#
|
public
|
fetchAllAssociative(): array
{@inheritDoc}
|
#
|
public
|
fetchAllKeyValue(): array
{@inheritDoc}
|
#
|
public
|
fetchAllAssociativeIndexed(): array
{@inheritDoc}
|
#
|
public
|
fetchFirstColumn(): array
{@inheritDoc}
|
#
|
public
|
iterateNumeric(): Traversable<int, array<int, mixed>>
{@inheritdoc}
|
#
|
public
|
iterateAssociative(): Traversable<int, array<string, mixed>>
{@inheritDoc}
|
#
|
public
|
iterateKeyValue(): Traversable<mixed, mixed>
{@inheritDoc}
|
#
|
public
|
iterateAssociativeIndexed(): Traversable<mixed, array<string, mixed>>
{@inheritDoc}
|
#
|
public
|
iterateColumn(): Traversable<int, mixed>
{@inheritDoc}
|
#
|
public
|
rowCount()
{@inheritDoc}
|
#
|
public
|
free(): void
Discards the non-fetched portion of the result, enabling the originating statement to be executed again.
Discards the non-fetched portion of the result, enabling the originating statement to be executed again.
Implements
|
#
|
public
|
bindValue($param, $value, $type = ParameterType::STRING)
{@inheritDoc}
Deprecated
This feature will no longer be available on Result object in 3.0.x version.
Parameters
$param |
Parameter identifier. For a prepared statement using named placeholders,
this will be a parameter name of the form :name. For a prepared statement
using question mark placeholders, this will be the 1-indexed position of the parameter.
|
$value |
The value to bind to the parameter.
|
$type |
Explicit data type for the parameter using the {@link ParameterType}
constants.
|
Returns
TRUE on success or FALSE on failure.
Implements
|
#
|
public
|
bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)
{@inheritDoc}
Deprecated
This feature will no longer be available on Result object in 3.0.x version.
Parameters
$param |
Parameter identifier. For a prepared statement using named placeholders,
this will be a parameter name of the form :name. For a prepared statement using
question mark placeholders, this will be the 1-indexed position of the parameter.
|
$variable |
Name of the PHP variable to bind to the SQL statement parameter.
|
$type |
Explicit data type for the parameter using the {@link ParameterType}
constants. To return an INOUT parameter from a stored procedure, use the bitwise
OR operator to set the PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter.
|
$length |
You must specify maxlength when using an OUT bind
so that PHP allocates enough memory to hold the returned value.
|
Returns
TRUE on success or FALSE on failure.
Implements
|
#
|
public
|
errorCode()
{@inheritDoc}
Deprecated
The error information is available via exceptions.
Returns
Implements
|
#
|
public
|
errorInfo()
{@inheritDoc}
Deprecated
The error information is available via exceptions.
Returns
Implements
|
#
|
public
|
execute($params = null)
{@inheritDoc}
Deprecated
This feature will no longer be available on Result object in 3.0.x version.
Parameters
$params |
An array of values with as many elements as there are
bound parameters in the SQL statement being executed.
|
Returns
TRUE on success or FALSE on failure.
Implements
|
#
|