MariaDbResult
in package
implements
DbResult
uses
DbResultTrait
AbstractYes
Represents a MariaDB/MySQL database result.
Table of Contents
Interfaces
- DbResult
- Represents a database result set.
Methods
- __construct() : MariaDbResult
- Creates a new MariaDbResult instance.
- getBoolean() : bool
- getBooleanOrNull() : bool|null
- getFieldCount() : int
- Gets the number of fields in the result per row.
- getFloat() : float
- getFloatOrNull() : float|null
- getInteger() : int
- getIntegerOrNull() : int|null
- getIterator() : DbResultIterator
- getRowCount() : int|string
- Gets the number of available rows in this result.
- getString() : string
- getStringOrNull() : string|null
- getValue() : mixed
- Gets the value from the target index without any additional casting.
- isNull() : bool
- Checks if a given index has a NULL value.
- next() : bool
- Fetches the next result set.
- seekRow() : void
- Seek to a specific row.
Methods
__construct()
Creates a new MariaDbResult instance.
public
__construct(mysqli_stmt|mysqli_result $result) : MariaDbResult
Parameters
- $result : mysqli_stmt|mysqli_result
-
A result to work with.
Return values
MariaDbResult —A result instance.
getBoolean()
public
getBoolean(int|string $index) : bool
Parameters
- $index : int|string
Return values
boolgetBooleanOrNull()
public
getBooleanOrNull(int|string $index) : bool|null
Parameters
- $index : int|string
Return values
bool|nullgetFieldCount()
Gets the number of fields in the result per row.
public
getFieldCount() : int
Return values
int —Number of fields.
getFloat()
public
getFloat(int|string $index) : float
Parameters
- $index : int|string
Return values
floatgetFloatOrNull()
public
getFloatOrNull(int|string $index) : float|null
Parameters
- $index : int|string
Return values
float|nullgetInteger()
public
getInteger(int|string $index) : int
Parameters
- $index : int|string
Return values
intgetIntegerOrNull()
public
getIntegerOrNull(int|string $index) : int|null
Parameters
- $index : int|string
Return values
int|nullgetIterator()
public
getIterator(callable $construct) : DbResultIterator
Parameters
- $construct : callable
Return values
DbResultIteratorgetRowCount()
Gets the number of available rows in this result.
public
getRowCount() : int|string
Return values
int|string —Number of available rows.
getString()
public
getString(int|string $index) : string
Parameters
- $index : int|string
Return values
stringgetStringOrNull()
public
getStringOrNull(int|string $index) : string|null
Parameters
- $index : int|string
Return values
string|nullgetValue()
Gets the value from the target index without any additional casting.
public
getValue(int|string $index) : mixed
Parameters
- $index : int|string
-
Target index.
Return values
mixed —Target value.
isNull()
Checks if a given index has a NULL value.
public
isNull(int|string $index) : bool
Parameters
- $index : int|string
-
Target index.
Return values
bool —true if the value is null, false if not.
next()
Fetches the next result set.
public
abstract next() : bool
Return values
bool —true if the result set was loaded, false if no more results are available.
seekRow()
Seek to a specific row.
public
seekRow(int $offset) : void
Parameters
- $offset : int
-
Offset of the row.