Issue Details (XML | Word | Printable)

Key: MDL-14974
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Petr Skoda
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14679

reset_columns() implementation...

Created: 25/May/08 10:27 AM   Updated: 26/May/08 12:32 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7) and Petr Skoda
Security Level: None
QA Assignee: Eloy Lafuente (stronk7)
Resolved date: 25/May/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Two things about reset_columns()

1) implementation looks buggy. If not table is passed, then the whole $this->columns should be = array() AFAIK. Easy to fix.
2) then, the method itself, I don't know in what situation we are going to use this, apart from all DDL stuff. So, IMO it would be easier to add one param to get_columns($table, $usecache = true). And them with that parameter:

a) if $usecache = true ==> current behaviour (using cache). Normal situation for DML stuff using get_columns()
b) if $usecache = false ==> never use the cache + reset it (for requested table) after execution. And we'd add that second parameter to all the DDL stuff using get_columns().

How does it sound. IMO it's easier that adding reset_columns() here and there. Just one param to control behaviour (cache/no cache).

Ciao :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) made changes - 25/May/08 10:54 AM
Field Original Value New Value
Parent MDL-14679 [ 26259 ]
Issue Type Bug [ 1 ] Sub-task [ 5 ]
Petr Skoda made changes - 25/May/08 05:03 PM
Status Open [ 1 ] In Progress [ 3 ]
Petr Skoda made changes - 25/May/08 05:34 PM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Eloy Lafuente (stronk7) made changes - 26/May/08 12:32 AM
QA Assignee stronk7
Status Resolved [ 5 ] Closed [ 6 ]