Edgewall Software

Opened 15 years ago

Last modified 11 years ago

#8647 closed enhancement

Streamline DB Connection API — at Initial Version

Reported by: anatoly techtonik <techtonik@…> Owned by:
Priority: normal Milestone: 1.0.1
Component: database backend Version: 0.11.5
Severity: normal Keywords: documentation
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This patch simplifies Trac DB API to make it easier to extend and add new DB backends. It introduces abstract DatabaseConnection class that clearly defines what required methods are used by Trac and must be implemented by Connection classes.

I've made it, because I found implicit ConnectionWrapper behavior misleading. I used SQLiteConnection method set as an example, but in the end my implementation failed to execute, because it didn't have commit() method - just like SQLiteConnection. It took a while to dig through PooledConnection to ConnectionWrapper then to SQLiteConnection and finally to ConnectionWrapper again to realize that commit() method is implicitly called from bundled SQLite library when it isn't found anywhere else.

I hope this negative developer experience will find more response in tracker than it had in mailing list. =)

Change History (1)

by anatoly techtonik <techtonik@…>, 15 years ago

Note: See TracTickets for help on using tickets.