aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/sql/open.py
Commit message (Collapse)AuthorAgeFilesLines
* Improve logging of sql queries a bit.Elrond2012-03-101-1/+3
| | | | | | | | | | | | | | | | Docs: http://docs.sqlalchemy.org/en/latest/core/engines.html#configuring-logging So for an application utilizing python logging for real (and MediaGoblin should) the rule is: - Don't use echo=True, - but reconfigure the appropiate loggers' level. So replaced the echo=True by a line to reconfigure the appropiate logger to achieve the same effect. This still dumps whole bloats of SQL queries into the main log, but at least they're not duped any more.
* Cleanup Session after each request.Elrond2012-02-281-0/+1
| | | | | | | | | | | It's good practice to cleanup the SQL session after each request so that the next request gets a fresh one. It's an application decision whether one wants a just-in-case ROLLBACK or COMMIT. There are two ideas behind it, really. I have decided for ROLLBACK. The idea is "if you forget to commit your changes yourself, there's something broken. Maybe you got an exception?".
* Fix copyright statements; add LICENSE for EXIF.pyWill Kahn-Greene2012-02-081-1/+1
|
* Add copyright header and a bit of pep8ificationElrond2012-01-201-1/+18
| | | | | | Nearly all the sql files missed a copyright header. So added it! And while there fixed a few pep8 things.
* Factor out check_db_migrations_currentElrond2012-01-011-0/+4
| | | | | | | | | | When initializing the database connection the current mongo based setup checked for new migrations and warned about them. This was mongo specific so factor'd it out into a more generic check_db_migrations_current function in the mongo backend. Also created a dummy one in the sql backend.
* SQL: mongokit like interfaceElrond2011-12-181-0/+29
In trying to ease the migration to SQL, created an interface to sqlalchemy that looks a lot like the interface that is currently in use. *WARNING* Work in progress