scottgonzalez / debt

DEBT: Exceptional Bug Tracking
MIT License
5 stars 2 forks source link

Determine how to handle database transactions #49

Closed scottgonzalez closed 10 years ago

scottgonzalez commented 10 years ago

Since each module is loaded once per app, and a single database connection is shared across all requests, transactions won't work.

scottgonzalez commented 10 years ago

Use connection pooling and pass the database reference as a property on the callback. The callbacks can be treated as option hashes for the method.

There should still be a single shared connection for the app which is used if no connection is passed with the callback.