IFetchAbstract
interface IFetchAbstract (View source)
This interface defines the contract for fetching data from a database.
Implementing classes should provide concrete implementations for the methods declared in this interface to handle data retrieval operations.
Methods
Fetches a single row from the result set, or false if there are no more rows.
Fetches the current row as both an associative and a numeric array.
Fetches a single row from the result set as a numerically indexed array, converting all values to strings, or returns false if there are no more rows.
Fetches the current row as a numeric array.
Fetches a single value from the result set, or false if there are no more rows.
Fetches all rows from the result set as an associative array, or an empty array if there are no more rows.
Fetches all rows from the result set as a numerically indexed array of arrays, converting all values to strings, or an empty array if there are no more rows.
Fetches all rows from the result set as an array of arrays, where each row is both numerically and associatively indexed.
Fetches all values of a single column from the result set as an array of strings.
Fetches all rows from the result set as an array of objects, each one being an instance of the provided class.
Details
object|false
internalFetchClass(array|null $constructorArguments = null, string|null $aClassOrObject = '\\stdClass')
Fetches a single row from the result set, or false if there are no more rows.
bool|array
internalFetchBoth()
Fetches the current row as both an associative and a numeric array.
array|null|false
internalFetchAssoc()
Fetches a single row from the result set as a numerically indexed array, converting all values to strings, or returns false if there are no more rows.
array|false|null
internalFetchNum()
Fetches the current row as a numeric array.
false|string
internalFetchColumn(int $columnIndex = 0)
Fetches a single value from the result set, or false if there are no more rows.
array
internalFetchAllAssoc()
Fetches all rows from the result set as an associative array, or an empty array if there are no more rows.
array
internalFetchAllNum()
Fetches all rows from the result set as a numerically indexed array of arrays, converting all values to strings, or an empty array if there are no more rows.
array
internalFetchAllBoth()
Fetches all rows from the result set as an array of arrays, where each row is both numerically and associatively indexed.
All values are converted to strings. If there are no more rows, an empty array is returned.
array
internalFetchAllColumn(int $columnIndex = 0)
Fetches all values of a single column from the result set as an array of strings.
array
internalFetchAllClass(array|null $constructorArguments = [], string|null $aClassOrObject = '\\stdClass')
Fetches all rows from the result set as an array of objects, each one being an instance of the provided class.
The class is created with the provided constructor arguments and properties are set with the values from the row. If there are no more rows, an empty array is returned.