Implementing resultset artifacts...

Implementing resultset artifacts...

Eloy Lafuente (stronk7) - келді
Number of replies: 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 Күлкі
In reply to 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.
In reply to Samuli Karevaara

Re: Implementing resultset artifacts...

Tim Hunt - келді
Core developers қатысушының суреті Documentation writers қатысушының суреті Particularly helpful Moodlers қатысушының суреті Peer reviewers қатысушының суреті Plugin developers қатысушының суреті