History | Log In     View a printable version of the current page.  
We are currently focused especially on Moodle 2.0, Moodle 1.9.x bugs and Moodle 1.9.x testing.    Confused? Lost? Please read this introduction to the Tracker.
Issue Details (XML | Word | Printable)

Key: MDL-14910
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Škoda
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Moodle
MDL-14679

moodle_database should have one disconnect method

Created: 20/May/08 05:59 AM   Updated: 26/May/08 03:57 AM
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7) and Petr Škoda
Security Level: None


 Description  « Hide
some times it could be desirable to close DB connections and reopen them again. In order to achieve this moodle_database objects should implement one disconnect() method, simply closing the connection (but leaving the moodle_database object created).

Also, perhaps some is_connected() or so should be able to return true/false and all moodle_database functions handling DB info should start with one:

if (!is_connected) {
    return false;
}

Ciao :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Škoda - 26/May/08 03:57 AM
dispose() method implemented - it closes all connections and releases all circular references (dm manager & generator)
it is not possible to reconnect, it is documented in the inline docs of dispose() method

please reopen if needed