#34903 closed feature request (fixed)
wpdb needs a close function
| Reported by: | fabifott | Owned by: | pento |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Database | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | performance |
Description
For a complete abstraction of the database access, the wpdb class needs a close() function.
A sample situation is a file-serving script, that runs for a long time reading a big file and pumping the bytes to the browser. Here a database connection is an unneeded resource and should be closed as soon as the IO pump starts.
Attachments (1)
Change History (10)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Would you accept a pull request?
Or at least make wpdb::$dbh somehow accessible. Its not good practice to hide the DB layer completly in an non-complete abstraction.