SqliteResult
in package
implements
DbResult
uses
DbResultTrait
Represents an SQLite result set.
Table of Contents
Interfaces
- DbResult
- Represents a database result set.
Methods
- __construct() : SqliteResult
- Creates a new instance of SqliteResult.
- getBoolean() : bool
- getBooleanOrNull() : bool|null
- getFieldCount() : int|string
- Gets the number of columns per row in the result.
- getFloat() : float
- getFloatOrNull() : float|null
- getInteger() : int
- getIntegerOrNull() : int|null
- getIterator() : DbResultIterator
- 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.
Methods
__construct()
Creates a new instance of SqliteResult.
public
__construct(SQLite3Result $result) : SqliteResult
Parameters
- $result : SQLite3Result
-
Raw underlying result class.
Return values
SqliteResult —A new SqliteResult 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 columns per row in the result.
public
getFieldCount() : int|string
Return values
int|string —Number of columns in a row.
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
DbResultIteratorgetString()
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
next() : bool
Return values
bool —true if the result set was loaded, false if no more results are available.