#8845: expose sqlite3 inTransaction as RO in_transaction Connection attribute.

Patch by R. David Murray, unit tests by Shashwat Anand.
This commit is contained in:
R. David Murray 2010-06-01 01:32:12 +00:00
parent bcb8d3a0a5
commit d35251dc19
6 changed files with 50 additions and 1 deletions

View file

@ -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}
};