Remove some vestigal code. Add the experimental sqlite3_transfer_bindings()

API. (CVS 2446)

FossilOrigin-Name: 88b39436f00d645cdb6333a7413c698c42227d3f
This commit is contained in:
drh
2005-04-22 02:38:37 +00:00
parent b47d45ccbf
commit f8db1bc03b
13 changed files with 167 additions and 38 deletions
+26 -1
View File
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.136 2005/03/29 03:11:00 danielk1977 Exp $
** $Id: test1.c,v 1.137 2005/04/22 02:38:38 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -971,6 +971,30 @@ static int test_expired(
return TCL_OK;
}
/*
** Usage: sqlite3_transfer_bindings FROMSTMT TOSTMT
**
** Transfer all bindings from FROMSTMT over to TOSTMT
*/
static int test_transfer_bind(
void * clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
sqlite3_stmt *pStmt1, *pStmt2;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " FROM-STMT TO-STMT", 0);
return TCL_ERROR;
}
if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt1)) return TCL_ERROR;
if( getStmtPointer(interp, Tcl_GetString(objv[2]), &pStmt2)) return TCL_ERROR;
Tcl_SetObjResult(interp,
Tcl_NewIntObj(sqlite3_transfer_bindings(pStmt1,pStmt2)));
return TCL_OK;
}
/*
** Usage: sqlite3_changes DB
**
@@ -2961,6 +2985,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "sqlite3_finalize", test_finalize ,0 },
{ "sqlite3_reset", test_reset ,0 },
{ "sqlite3_expired", test_expired ,0 },
{ "sqlite3_transfer_bindings", test_transfer_bind ,0 },
{ "sqlite3_changes", test_changes ,0 },
{ "sqlite3_step", test_step ,0 },