Issue Details (XML | Word | Printable)

Key: MDL-14910
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
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

moodle_database should have one disconnect method

Created: 20/May/08 05:59 AM   Updated: 26/May/08 03:57 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
Resolved date: 26/May/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 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 Skoda committed 4 files to 'Moodle CVS' - 26/May/08 03:56 AM
MDL-14910 added option to dispose existing database instance (closes connection and releases all resources)
MODIFY lib/dml/Attic/adodb_moodle_database.php   Rev. 1.6    (+14 -8 lines)
MODIFY lib/ddl/sql_generator.php   Rev. 1.6    (+8 -1 lines)
MODIFY lib/ddl/database_manager.php   Rev. 1.7    (+12 -1 lines)
MODIFY lib/dml/moodle_database.php   Rev. 1.7    (+14 -1 lines)