Mon, 20 Dec 2010 23:03:00 +0000
Use SQLite built in mechanism for tracking transactions
1 | 1 | #include <sqlite3.h> |
2 | #include <dbd/common.h> | |
3 | ||
4 | #define DBD_SQLITE_CONNECTION "DBD.SQLite3.Connection" | |
5 | #define DBD_SQLITE_STATEMENT "DBD.SQLite3.Statement" | |
6 | ||
2 | 7 | /* |
8 | * connection object | |
9 | */ | |
1 | 10 | typedef struct _connection { |
11 | sqlite3 *sqlite; | |
13
10c8c6f0da14
Added connection:autocommit(), connection:commit(), and connection:rollback() to control transactions.
nrich@ii.net
parents:
2
diff
changeset
|
12 | int autocommit; |
43
356dcb1d455c
Use SQLite built in mechanism for tracking transactions
nrich@ii.net
parents:
41
diff
changeset
|
13 | // int txn_in_progress; |
1 | 14 | } connection_t; |
15 | ||
2 | 16 | /* |
17 | * statement object | |
18 | */ | |
1 | 19 | typedef struct _statement { |
41 | 20 | connection_t *conn; |
1 | 21 | sqlite3_stmt *stmt; |
22 | int more_data; | |
21
7956401a0c5e
Added the statement:affected() and statement:rowcount() methods.
nrich@ii.net
parents:
13
diff
changeset
|
23 | int affected; |
1 | 24 | } statement_t; |
25 |