Am 01.11.2012 15:12, schrieb Christoph Zwerschke:
> Any opinions on that? I have also asked for feedback on the dbsig
> mailing list.
Ok, so the consensus on the dbsig mailing list was to implement the
context manager for a connection like in SQLite. So I have now changed
it and implemented it that way for both pg and pgdb.
Usage is now like this:
db = DB('mydb') as db:
with db:
db.query('insert into credit values (100)')
db.query('insert into debit values (-100)')
db.close()
I have also added the corresponding unittests for pg and pgdb.
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql