Moodle

moodle_database should have one disconnect method

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Database SQL/XMLDB
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

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

Activity

Hide
Petr Škoda (skodak) added a comment -

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

Show
Petr Škoda (skodak) added a comment - 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

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: