1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add experimental sqlite_reset() API (allows pre-compiled queries) (CVS 1060)

FossilOrigin-Name: 1d2fcb017811db90e85d63f2ca76867c00ab8f1b
This commit is contained in:
danielk1977
2003-07-22 09:24:43 +00:00
parent 4d87325d61
commit 999af643a0
6 changed files with 72 additions and 15 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.138 2003/07/09 00:28:14 drh Exp $
** $Id: main.c,v 1.139 2003/07/22 09:24:45 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -714,6 +714,21 @@ int sqlite_finalize(
return rc;
}
/*
** Destroy a virtual machine in the same manner as sqlite_finalize(). If
** possible, leave *ppVm pointing at a new virtual machine which may be
** used to re-execute the query.
*/
int sqlite_reset(
sqlite_vm *pVm, /* The virtual machine to be destroyed */
char **pzErrMsg, /* OUT: Write error messages here */
sqlite_vm **ppVm /* OUT: The new virtual machine */
){
int rc = sqliteVdbeReset((Vdbe*)pVm, pzErrMsg, (Vdbe **)ppVm);
sqliteStrRealloc(pzErrMsg);
return rc;
}
/*
** Return a static string that describes the kind of error specified in the
** argument.