-C Add\scode\sto\stest8.c\sto\scheck\sthat\sthe\scorrect\sidxNum\svalue\sis\spassed\sto\sthe\sxFilter\smethod.\s(CVS\s3241)
-D 2006-06-14T10:55:53
+C Add\sthe\sopcode\sOP_VUpdate\sand\sreplace\sthe\sxInsert/xDelete\smembers\sof\ssqlite3_module\swith\sxUpdate.\s(CVS\s3242)
+D 2006-06-14T13:03:23
F Makefile.in 200f6dc376ecfd9b01e5359c4e0c10c02f649b34
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/select.c 38eda11d950ed5e631ea9054f84a4a8b9e9b39d8
F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
F src/shell.c ad73192b30a338a58fe81183d4a5d5a1d4e51d36
-F src/sqlite.h.in 45975614ab23be1be971a1624a2c5f6801c99c2d
+F src/sqlite.h.in b1ecebd3154cf49ba189193f7bdc10a78a9394a2
F src/sqlite3ext.h 127bd394c8eea481f2ac9b754bf399dbfc818b75
F src/sqliteInt.h e8710fd5c10c03ca4a2fb49802b8aae6689f27a0
F src/table.c f64ec4fbfe333f8df925bc6ba494f55e05b0e75e
F src/utf.c ab81ac59084ff1c07d421eb1a0a84ec809603b44
F src/util.c ca6ee72772c0f5dc04d2e0ab1973fd3b6a9bf79d
F src/vacuum.c 5b37d0f436f8e1ffacd17934e44720b38d2247f9
-F src/vdbe.c 51f94a1f1647a85f4e5eb6418624f8d1ef67622a
+F src/vdbe.c 337ef4045ade927fa77192d0d040001b2386fba3
F src/vdbe.h 258b5d1c0aaa72192f09ff0568ce42b383f156fa
F src/vdbeInt.h 6ccb7eaae76ebd761470f6a035501ff33aa92c20
F src/vdbeapi.c af663689ef57e5506f190bbd1068d28936b0fb34
-F src/vdbeaux.c c9474fd27f1735170feb4f6a46885d282cf22d52
+F src/vdbeaux.c ba6e06a630dc2e16010199aa69e6a0b1fa58070f
F src/vdbefifo.c 9efb94c8c3f4c979ebd0028219483f88e57584f5
F src/vdbemem.c 5f0afe3b92bb2c037f8d5d697f7c151fa50783a3
-F src/vtab.c b198496e428e1d1c1fef96afeac36828f0171628
+F src/vtab.c 507cbb4e2101900339ce88e57144cc01dafa374e
F src/where.c 299c385e32a7b98d42864c7c83cdc6a778fae562
F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 75be7d4988a3618ea9e3c1b65d5c05380ec7d25d
-R f2a6628a8f1ede4d65ffbece9678b741
+P 77bcaf99b3aba0f482e0504a5409c8f79cc441b4
+R d3b17db0e8eb69099a53af1d17a74bec
U danielk1977
-Z 0fc9e6c28ad3363f40d3a481f56028e0
+Z 36fddf2684ef0d527dd46a2b7972fb6f
-77bcaf99b3aba0f482e0504a5409c8f79cc441b4
\ No newline at end of file
+418f3ca84abf0d0876d2c4430f7f6ceaa9c0a17b
\ No newline at end of file
** This header file defines the interface that the SQLite library
** presents to client programs.
**
-** @(#) $Id: sqlite.h.in,v 1.175 2006/06/14 06:58:16 danielk1977 Exp $
+** @(#) $Id: sqlite.h.in,v 1.176 2006/06/14 13:03:23 danielk1977 Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
int (*xNext)(sqlite3_vtab_cursor*);
int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
int (*xRowid)(sqlite3_vtab_cursor*, sqlite_int64 *pRowid);
- int (*xInsert)(sqlite3_vtab *pVTab, sqlite3_value **apData);
- int (*xDelete)(sqlite3_vtab *pVTab, sqlite_int64 rowid);
+ int (*xUpdate)(sqlite3_vtab *pVTab, int, sqlite3_value **apData);
int (*xBegin)(sqlite3_vtab *pVTab);
int (*xSync)(sqlite3_vtab *pVTab);
int (*xCommit)(sqlite3_vtab *pVTab);
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.558 2006/06/13 23:51:35 drh Exp $
+** $Id: vdbe.c,v 1.559 2006/06/14 13:03:24 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VUpdate * P2 P3
+**
+** P3 is a pointer to a virtual table object, an sqlite3_vtab structure.
+** This opcode invokes the corresponding xUpdate method. P2 values
+** are taken from the stack to pass to the xUpdate invocation. The
+** value on the top of the stack corresponds to the p2th element
+** of the argv array passed to xUpdate.
+*/
+case OP_VUpdate: {
+ sqlite3_vtab *pVtab = (sqlite3_vtab *)(pOp->p3);
+ sqlite3_module *pModule = (sqlite3_module *)pVtab->pModule;
+ if( pModule->xUpdate==0 ){
+ sqlite3SetString(&p->zErrMsg, "Unsupported module operation: xUpdate", 0);
+ rc = SQLITE_ERROR;
+ }else{
+ int i;
+ Mem **apArg = p->apArg;
+ int nArg = pOp->p1;
+ for(i = 0; i<nArg; i++){
+ apArg[i] = &pTos[i+1-nArg];
+ storeTypeInfo(apArg[i], 0);
+ }
+ rc = pModule->xUpdate(pVtab, nArg, apArg);
+ }
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
/* An other opcode is illegal...
*/
default: {
** This routine is called once after all opcodes have been inserted.
**
** Variable *pMaxFuncArgs is set to the maximum value of any P2 argument
-** to an OP_Function or OP_AggStep opcode. This is used by
+** to an OP_Function, OP_AggStep or OP_VFilter opcode. This is used by
** sqlite3VdbeMakeReady() to size the Vdbe.apArg[] array.
**
** The integer *pMaxStack is set to the maximum number of vdbe stack
for(pOp=p->aOp, i=p->nOp-1; i>=0; i--, pOp++){
u8 opcode = pOp->opcode;
- if( opcode==OP_Function || opcode==OP_AggStep ){
+ if( opcode==OP_Function || opcode==OP_AggStep ||
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ opcode==OP_VFilter
+#endif
+ ){
if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
}else if( opcode==OP_Halt ){
if( pOp->p1==SQLITE_CONSTRAINT && pOp->p2==OE_Abort ){
*************************************************************************
** This file contains code used to help implement virtual tables.
**
-** $Id: vtab.c,v 1.10 2006/06/14 06:58:16 danielk1977 Exp $
+** $Id: vtab.c,v 1.11 2006/06/14 13:03:24 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
return SQLITE_OK;
}
-
/*
** Clear any and all virtual-table information from the Table record.
** This routine is called, for example, just before deleting the Table