Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

QueryResult inconsistency #30

Closed
JeroenDeDauw opened this issue Mar 28, 2014 · 3 comments
Closed

QueryResult inconsistency #30

JeroenDeDauw opened this issue Mar 28, 2014 · 3 comments
Labels
Milestone

Comments

@JeroenDeDauw
Copy link
Contributor

Is retuning object for MW implementation and array for the PDO one

@JeroenDeDauw JeroenDeDauw added this to the 0.2 milestone Mar 28, 2014
@JeroenDeDauw
Copy link
Contributor Author

See wmde/WikibaseQueryEngine#12

@JeroenDeDauw
Copy link
Contributor Author

PDO and DBAL return associative arrays, while MediaWiki returns objects. When using PDO or DBAL, one can specify to use objects instead, but the MW ResultWrapper class has no such option. (This can however be added easily.) QueryEngine expects associative arrays at present.

We can

  • Add the option to ResultWrapper
  • Wrap ResultWrapper in a new Iterator
  • Tell DBAL to return objects and modify QueryEngine usage

@frimelle
Copy link
Contributor

Task on Phabricator: https://phabricator.wikimedia.org/T87746

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants