[New-bugs-announce] [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

R. David Murray report at bugs.python.org
Fri May 28 19:54:09 CEST 2010


New submission from R. David Murray <rdmurray at bitdance.com>:

I have a use case where I'd like to be able to check whether or not there is an uncommitted transaction.  The use case is a REPL database editor.  If the user issues the 'save' command a commit is done.  When they quit the application, I'd like to be able to prompt them with a 'save or discard' if and only if they have made changes since the last save.  Exposing the connection's inTransaction attribute would allow me to do this.  The attached patch does this as a read only attribute named in_transaction.  I'll add unit tests if this idea isn't rejected.

----------
components: Extension Modules
files: sqlite.in_transaction.patch
keywords: easy, patch
messages: 106683
nosy: ghaering, r.david.murray
priority: normal
severity: normal
stage: unit test needed
status: open
title: Expose sqlite3 connection inTransaction as read-only in_transaction attribute
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file17482/sqlite.in_transaction.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8845>
_______________________________________


More information about the New-bugs-announce mailing list