final class MysqlResult extends DatabaseResult (View source)

Adapts a MySQLi result handle to cached framework result projections.

Methods

array from DatabaseResult
result(string $type = 'object')
array
array
array
array from DatabaseResult
custom_result_object(string $className)
array
mixed from DatabaseResult
row(int|string $n = 0, string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

mixed
array|null from DatabaseResult
row_array(int $n = 0)
array|null
object|null from DatabaseResult
row_object(int $n = 0)

Provides this part of the database contract while preserving the object's current state and driver semantics.

object|null
mixed from DatabaseResult
first_row(string $type = 'object')

Retrieves the requested value without changing the current database state.

mixed
mixed from DatabaseResult
last_row(string $type = 'object')

Retrieves the requested value without changing the current database state.

mixed
mixed from DatabaseResult
next_row(string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

mixed
mixed from DatabaseResult
previous_row(string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

mixed
array|null

Fetches the next native row as an associative array for DatabaseResult traversal.

array|null
static MysqlResult
fromMysqliResult(mysqli_result $result)

Wraps a result-producing MySQLi execution for framework result consumption.

int

Returns the number of rows buffered by the MySQLi result handle.

int
int

Returns the number of fields described by the MySQLi result handle.

int
array

Lists field names in the result-set order reported by MySQLi.

array
array

Converts MySQLi field metadata into framework field value objects.

array
array

Converts field metadata to the legacy object shape expected by compatible consumers.

array
bool
data_seek(int $n = 0)

Repositions the MySQLi result cursor for subsequent row reads.

bool
void

Releases the native MySQLi result buffer.

void

Details

result

array result(string $type = 'object')

No description

Parameters

string $type

Return Value

array

result_object

array result_object()

No description

Return Value

array

result_array

array result_array()

No description

Return Value

array

custom_result_object

array custom_result_object(string $className)

No description

Parameters

string $className

Return Value

array

row

mixed row(int|string $n = 0, string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

int|string $n
string $type

Return Value

mixed

row_array

array|null row_array(int $n = 0)

No description

Parameters

int $n

Return Value

array|null

row_object

object|null row_object(int $n = 0)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

int $n

Return Value

object|null

first_row

mixed first_row(string $type = 'object')

Retrieves the requested value without changing the current database state.

Parameters

string $type

Return Value

mixed

last_row

mixed last_row(string $type = 'object')

Retrieves the requested value without changing the current database state.

Parameters

string $type

Return Value

mixed

next_row

mixed next_row(string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $type

Return Value

mixed

previous_row

mixed previous_row(string $type = 'object')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $type

Return Value

mixed

fetchAssoc

protected array|null fetchAssoc()

Fetches the next native row as an associative array for DatabaseResult traversal.

Return Value

array|null

fromMysqliResult

static MysqlResult fromMysqliResult(mysqli_result $result)

Wraps a result-producing MySQLi execution for framework result consumption.

Parameters

mysqli_result $result

Return Value

MysqlResult

num_rows

int num_rows()

Returns the number of rows buffered by the MySQLi result handle.

Return Value

int

num_fields

int num_fields()

Returns the number of fields described by the MySQLi result handle.

Return Value

int

list_fields

array list_fields()

Lists field names in the result-set order reported by MySQLi.

Return Value

array

field_data

array field_data()

Converts MySQLi field metadata into framework field value objects.

Return Value

array

field_data_object

array field_data_object()

Converts field metadata to the legacy object shape expected by compatible consumers.

Return Value

array

data_seek

bool data_seek(int $n = 0)

Repositions the MySQLi result cursor for subsequent row reads.

Parameters

int $n

Return Value

bool

free_result

void free_result()

Releases the native MySQLi result buffer.

Return Value

void