Implementing resultset artifacts...

Implementing resultset artifacts...

- Eloy Lafuente (stronk7) の投稿
返信数: 3
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers 画像 Testers
Hi,

I was in the process of fixing one bug, related with resultsets and Oracle when, after one interesting (and long) chat with Martín Langhoff クール, we have agreed that we need to define once and for all, how we are going to handle recordsets under Moodle.

As you know, there are a buch of cool get_recordsetXXX() functions available under Moodle. This functions are pretty similar to their get_recordXXX() counterparts, but they are specialized to work against BIG sets of records.

And they are really memory efficient because we can iterate, scroll and so over them saving tons of memory.

Currently there are 3 ADOdb (our great low-level DB abstraction layer) functions that we are using in Moodle code to perform such iterations.

As they are ADOdb functions we cannot hack them (and we need to do that in order to fix the bug that originated all this thoughts) and they are ADOdb dependent so we'll suffer if someday (never thought about that before now) we switch from ADODB to another alternative).

So we need to have some functions to handle recordsets in order to:

- Be 100% cross-db compatible for supported DBs.
- Be stable and costant along the time.
- Follow one good OOP approach in order to handle recorsets in a natural way
- Fix the original Oracle bug.

So, in the bug ( http://tracker.moodle.org/browse/MDL-8134 ), thanks to Iñaki by detecting and tracing it! I've posted 4 different alternatives to solve the problem.

Each one has its own pros/cons and we should discuss a bit about them to decide how is going to be our RecordSet API (that, over the time, could be more and more used over the "old" get_recordXXX() functions).

So please, feel free to read, understand and discuss about the thing here.

TIA and ciao 笑顔
Eloy Lafuente (stronk7) への返信

Re: Implementing resultset artifacts...

- Samuli Karevaara の投稿
Could you please re-open Bug 2097 for reconsideration? It's a minor issue, but a logic error nevertheless, and gets in the way of "var_dump debugging". I added a comment in the bug with links to two threads about the issue.
Samuli Karevaara への返信

Re: Implementing resultset artifacts...

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers
That bug was fix (in 1.7 or 1.8).