HomeDevCentral

Use associative arrays by default for MySQLi results

Description

Use associative arrays by default for MySQLi results

Summary:
The MySQLi extension supports three different fetch modes
to represent a row as an array:

  • associative keys
  • numeric keys
  • both of them

This change switches from the default "both of them"
to associative keys to encourage more expressive code,
and ease code maintenance.

The queryScalar method will seek the first key of the array accordingly.

Test Plan: Unit tests added and updated accordingly for MySQLi

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D3207

Details

Provenance
derecksonAuthored on Jun 22 2023, 21:25
derecksonPushed on Jun 22 2023, 21:56
Reviewer
dereckson
Differential Revision
D3207: Use associative arrays by default for MySQLi results
Parents
rKDB6ea0765d84c0: Allow to mock DatabaseEngine
Branches
Unknown
Tags
Unknown
References
tag: 0.4.0