diff options
Diffstat (limited to 'Modules/_sqlite/connection.h')
-rw-r--r-- | Modules/_sqlite/connection.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h index fe05297f36..c8e2f7cbd2 100644 --- a/Modules/_sqlite/connection.h +++ b/Modules/_sqlite/connection.h @@ -1,6 +1,6 @@ /* connection.h - definitions for the connection type * - * Copyright (C) 2004-2007 Gerhard Häring <gh@ghaering.de> + * Copyright (C) 2004-2010 Gerhard Häring <gh@ghaering.de> * * This file is part of pysqlite. * @@ -39,7 +39,7 @@ typedef struct /* 1 if we are currently within a transaction, i. e. if a BEGIN has been * issued */ - int inTransaction; + char inTransaction; /* the type detection mode. Only 0, PARSE_DECLTYPES, PARSE_COLNAMES or a * bitwise combination thereof makes sense */ @@ -63,17 +63,21 @@ typedef struct * used from the same thread it was created in */ int check_same_thread; + int initialized; + /* thread identification of the thread the connection was created in */ long thread_ident; pysqlite_Cache* statement_cache; - /* A list of weak references to statements used within this connection */ + /* Lists of weak references to statements and cursors used within this connection */ PyObject* statements; + PyObject* cursors; - /* a counter for how many statements were created in the connection. May be + /* Counters for how many statements/cursors were created in the connection. May be * reset to 0 at certain intervals */ int created_statements; + int created_cursors; PyObject* row_factory; @@ -120,6 +124,7 @@ PyObject* pysqlite_connection_rollback(pysqlite_Connection* self, PyObject* args PyObject* pysqlite_connection_new(PyTypeObject* type, PyObject* args, PyObject* kw); int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject* kwargs); +int pysqlite_connection_register_cursor(pysqlite_Connection* connection, PyObject* cursor); int pysqlite_check_thread(pysqlite_Connection* self); int pysqlite_check_connection(pysqlite_Connection* con); |