]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add column_value, declare_vtab and create_module to the function table used by dynami...
authordanielk1977 <danielk1977@noemail.net>
Thu, 15 Jun 2006 15:38:41 +0000 (15:38 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Thu, 15 Jun 2006 15:38:41 +0000 (15:38 +0000)
FossilOrigin-Name: 25c475087892fea83bce9d140b46651793b85a86

manifest
manifest.uuid
src/loadext.c
src/sqlite3ext.h
src/test8.c

index 91b1cfce5efa2d4eab9d4fa8bda26b12e9e1f2fa..f482728c418eb0d61f57f538ad6374b3059664da 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Write\sdatabase\spages\sin\ssorted\sorder\sto\sreduce\sfile\sfragmentation.\nThis\sis\san\sexperimental\schange.\s\sIt\sis\snot\sclear\sif\sit\swill\shelp\sany.\nIt\smay\swell\sbe\sremoved\sin\sthe\sfuture.\s(CVS\s3255)
-D 2006-06-15T14:31:07
+C Add\scolumn_value,\sdeclare_vtab\sand\screate_module\sto\sthe\sfunction\stable\sused\sby\sdynamic\sextensions.\s(CVS\s3256)
+D 2006-06-15T15:38:42
 F Makefile.in 200f6dc376ecfd9b01e5359c4e0c10c02f649b34
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -48,7 +48,7 @@ F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
 F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
 F src/insert.c eba160c6d7f2c44232ff0f168f7b047e20d6f473
 F src/legacy.c fa15d505dd4e45044177ee4d1c6aeaf8c836d390
-F src/loadext.c d8c7bd14e6ebc4e9f1ff269475bf63e131919449
+F src/loadext.c 676257ae268457e7f03261d8ca0d1e72968a26c8
 F src/main.c 7875e8835539d4f16e8b62fad1dee9bda2091272
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/os.c 59f05de8c5777c34876607114a2fbe55ae578235
@@ -73,7 +73,7 @@ F src/select.c 38eda11d950ed5e631ea9054f84a4a8b9e9b39d8
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c ad73192b30a338a58fe81183d4a5d5a1d4e51d36
 F src/sqlite.h.in 1dc44da025da28a011d11ad1608c11a951047fab
-F src/sqlite3ext.h 127bd394c8eea481f2ac9b754bf399dbfc818b75
+F src/sqlite3ext.h fc8647211af0caa9d8e49ab31624b357c1332380
 F src/sqliteInt.h 5eb64f1dd9a8b237d147962bc57637d87e044ff4
 F src/table.c f64ec4fbfe333f8df925bc6ba494f55e05b0e75e
 F src/tclsqlite.c 4ad22f354b6e4e137889000e9f585a0590ca39c5
@@ -84,7 +84,7 @@ F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25
 F src/test5.c 7162f8526affb771c4ed256826eee7bb9eca265f
 F src/test6.c 60a02961ceb7b3edc25f5dc5c1ac2556622a76de
 F src/test7.c 03fa8d787f6aebc6d1f72504d52f33013ad2c8e3
-F src/test8.c f3082601d4eae6284b33a36fcfe00c8d8d17ee47
+F src/test8.c 9579de4645c9b8be3f8de217224bcf9280da9b6a
 F src/test_async.c e3deaedd4d86a56391b81808fde9e44fbd92f1d3
 F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
 F src/test_md5.c 6c42bc0a3c0b54be34623ff77a0eec32b2fa96e3
@@ -366,7 +366,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P d145dc1c4bce403ec967bfd0024002d4de57f833
-R 2239e05327023592b50f3f9abbe32c42
-U drh
-Z 91f8e7798ae68e6bd7062239e69b6453
+P fe3e70a7275d68acb6fb8ea5d62bed3e9d8d2766
+R 47a8b2f6537c22850ce9af0f2e0f04a2
+U danielk1977
+Z ec60b2bf5c12236743a6bbfcf541f438
index fc78647d91d4e0537bf78d69cf6eb4f9ccdc12f5..11aca19e88b53c89e798685494c1d7dbbd797842 100644 (file)
@@ -1 +1 @@
-fe3e70a7275d68acb6fb8ea5d62bed3e9d8d2766
\ No newline at end of file
+25c475087892fea83bce9d140b46651793b85a86
\ No newline at end of file
index b0902e8d048d6229b7dcf23017c0c6367bac45e1..5dd5662d8839523a70c530a2507b390585ceb142 100644 (file)
@@ -89,6 +89,7 @@ const sqlite3_api_routines sqlite3_api = {
   sqlite3_column_text,
   sqlite3_column_text16,
   sqlite3_column_type,
+  sqlite3_column_value,
   sqlite3_commit_hook,
   sqlite3_complete,
   sqlite3_complete16,
@@ -96,8 +97,10 @@ const sqlite3_api_routines sqlite3_api = {
   sqlite3_create_collation16,
   sqlite3_create_function,
   sqlite3_create_function16,
+  sqlite3_create_module,
   sqlite3_data_count,
   sqlite3_db_handle,
+  sqlite3_declare_vtab,
   sqlite3_enable_shared_cache,
   sqlite3_errcode,
   sqlite3_errmsg,
index 59d410bf05e64db03350e0e7c4b0f115c4232b30..5de71f9804932045ce7dee5695de2551d637a74a 100644 (file)
@@ -15,7 +15,7 @@
 ** as extensions by SQLite should #include this file instead of 
 ** sqlite3.h.
 **
-** @(#) $Id: sqlite3ext.h,v 1.1 2006/06/08 15:28:44 drh Exp $
+** @(#) $Id: sqlite3ext.h,v 1.2 2006/06/15 15:38:42 danielk1977 Exp $
 */
 #ifndef _SQLITE3EXT_H_
 #define _SQLITE3EXT_H_
@@ -66,6 +66,7 @@ struct sqlite3_api_routines {
   const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
   const void * (*column_text16)(sqlite3_stmt*,int iCol);
   int  (*column_type)(sqlite3_stmt*,int iCol);
+  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
   void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
   int  (*complete)(const char*sql);
   int  (*complete16)(const void*sql);
@@ -73,8 +74,10 @@ struct sqlite3_api_routines {
   int  (*create_collation16)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
   int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
   int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
+  int (*create_module)(sqlite3*,const char*,sqlite3_module*,void*);
   int  (*data_count)(sqlite3_stmt*pStmt);
   sqlite3 * (*db_handle)(sqlite3_stmt*);
+  int (*declare_vtab)(sqlite3*,const char*);
   int  (*enable_shared_cache)(int);
   int  (*errcode)(sqlite3*db);
   const char * (*errmsg)(sqlite3*);
@@ -189,6 +192,7 @@ struct sqlite3_api_routines {
 #define sqlite3_column_text            sqlite3_api->column_text
 #define sqlite3_column_text16          sqlite3_api->column_text16
 #define sqlite3_column_type            sqlite3_api->column_type
+#define sqlite3_column_value           sqlite3_api->column_value
 #define sqlite3_commit_hook            sqlite3_api->commit_hook
 #define sqlite3_complete               sqlite3_api->complete
 #define sqlite3_complete16             sqlite3_api->complete16
@@ -196,8 +200,10 @@ struct sqlite3_api_routines {
 #define sqlite3_create_collation16     sqlite3_api->create_collation16
 #define sqlite3_create_function        sqlite3_api->create_function
 #define sqlite3_create_function16      sqlite3_api->create_function16
+#define sqlite3_create_module          sqlite3_api->create_module
 #define sqlite3_data_count             sqlite3_api->data_count
 #define sqlite3_db_handle              sqlite3_api->db_handle
+#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
 #define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
 #define sqlite3_errcode                sqlite3_api->errcode
 #define sqlite3_errmsg                 sqlite3_api->errmsg
index f3d788a3b04671bfbb7f045a96dc673ff5f48b05..847ae20f55b972c1172769790fce7780a1b47fa6 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test8.c,v 1.22 2006/06/15 10:41:16 danielk1977 Exp $
+** $Id: test8.c,v 1.23 2006/06/15 15:38:42 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -25,11 +25,14 @@ typedef struct echo_vtab echo_vtab;
 typedef struct echo_cursor echo_cursor;
 
 /* 
-** An echo virtual-table object 
+** An echo virtual-table object.
 **
-** If it is not NULL, the aHasIndex array is allocated so that it has
-** the same number of entries as there are columns in the underlying
-** real table.
+** echo.vtab.aIndex is an array of booleans. The nth entry is true if 
+** the nth column of the real table is the left-most column of an index
+** (implicit or otherwise). In other words, if SQLite can optimize
+** a query like "SELECT * FROM real_table WHERE col = ?".
+**
+** Member variable contains copies of the column names of the real table.
 */
 struct echo_vtab {
   sqlite3_vtab base;