SQLiteResult
in package
implements
IDbResult
Uses
DbResultTrait
Represents an SQLite result set.
Table of Contents
Interfaces
- IDbResult
- Represents a database result set.
Methods
- __construct() : SQLiteResult
- Creates a new instance of SQLiteResult.
- close() : void
- 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
- getStream() : Stream|null
- Gets the value from the target index as a Stream.
- 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.
close()
public
close() : void
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
DbResultIteratorgetStream()
Gets the value from the target index as a Stream.
public
getStream(int|string $index) : Stream|null
If you're aware that you're using SQLite it may make more sense to use SQLiteConnection::getBlobStream instead.
Parameters
- $index : int|string
-
Target index.
Return values
Stream|null —A Stream if data is available, null if not.
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
next() : bool
Return values
bool —true if the result set was loaded, false if no more results are available.