summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-06-01 01:32:12 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-06-01 01:32:12 (GMT)
commitd35251dc19b6f2d1cacbb622a578c81f33d8553a (patch)
treefd24991f9bc92a4f1360c25647ddb159745a8874 /Modules/_sqlite
parentbcb8d3a0a5d2d7e0d962bd9164ea81128472e21c (diff)
downloadcpython-d35251dc19b6f2d1cacbb622a578c81f33d8553a.zip
cpython-d35251dc19b6f2d1cacbb622a578c81f33d8553a.tar.gz
cpython-d35251dc19b6f2d1cacbb622a578c81f33d8553a.tar.bz2
#8845: expose sqlite3 inTransaction as RO in_transaction Connection attribute.
Patch by R. David Murray, unit tests by Shashwat Anand.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 184bdee..8bfc9ba 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -23,6 +23,7 @@
#include "cache.h"
#include "module.h"
+#include "structmember.h"
#include "connection.h"
#include "statement.h"
#include "cursor.h"
@@ -1551,6 +1552,7 @@ static struct PyMemberDef connection_members[] =
{"NotSupportedError", T_OBJECT, offsetof(pysqlite_Connection, NotSupportedError), READONLY},
{"row_factory", T_OBJECT, offsetof(pysqlite_Connection, row_factory)},
{"text_factory", T_OBJECT, offsetof(pysqlite_Connection, text_factory)},
+ {"in_transaction", T_BOOL, offsetof(pysqlite_Connection, inTransaction), READONLY},
{NULL}
};