mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Bring sqlite3 module up-to-date with what's now in 2.6. Almost. I intentionally
left out the stuff about creating a connection object from a APSW connection.
This commit is contained in:
parent
b1b9382d91
commit
e7ea7451a8
22 changed files with 586 additions and 200 deletions
|
@ -1,6 +1,6 @@
|
|||
/* util.c - various utility functions
|
||||
*
|
||||
* Copyright (C) 2005-2006 Gerhard Häring <gh@ghaering.de>
|
||||
* Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
|
||||
*
|
||||
* This file is part of pysqlite.
|
||||
*
|
||||
|
@ -45,10 +45,15 @@ int _sqlite_step_with_busyhandler(sqlite3_stmt* statement, pysqlite_Connection*
|
|||
* Checks the SQLite error code and sets the appropriate DB-API exception.
|
||||
* Returns the error code (0 means no error occurred).
|
||||
*/
|
||||
int _pysqlite_seterror(sqlite3* db)
|
||||
int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st)
|
||||
{
|
||||
int errorcode;
|
||||
|
||||
/* SQLite often doesn't report anything useful, unless you reset the statement first */
|
||||
if (st != NULL) {
|
||||
(void)sqlite3_reset(st);
|
||||
}
|
||||
|
||||
errorcode = sqlite3_errcode(db);
|
||||
|
||||
switch (errorcode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue