New submission from R. David Murray <rdmur...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue8845>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to