mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove the iCollate argument from sqlite3_create_function() (CVS 1632)
FossilOrigin-Name: 728d57ff5517a51c3aad4ba95525b1aa2065bd19
This commit is contained in:
28
manifest
28
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Update\ssqlite3_close()\sAPI\sto\smatch\sdocumentation.\s(CVS\s1630)
|
C Remove\sthe\siCollate\sargument\sfrom\ssqlite3_create_function()\s(CVS\s1632)
|
||||||
D 2004-06-19T03:33:57
|
D 2004-06-19T08:18:08
|
||||||
F Makefile.in d69d53c543518c1572ee0a8e8723d7e00bdb2266
|
F Makefile.in d69d53c543518c1572ee0a8e8723d7e00bdb2266
|
||||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||||
@@ -29,17 +29,17 @@ F src/auth.c 204e1e9c45e64315589bc8b62cba5d9de29b6a3c
|
|||||||
F src/btree.c 0cf8a52a57a7eb13d50719114ee1fa353e89d7d3
|
F src/btree.c 0cf8a52a57a7eb13d50719114ee1fa353e89d7d3
|
||||||
F src/btree.h 32f96abef464cf8765b23ca669acfe90d191fcc5
|
F src/btree.h 32f96abef464cf8765b23ca669acfe90d191fcc5
|
||||||
F src/build.c 239bd93949db1ddc277f26c27e0d613ff5fe16c7
|
F src/build.c 239bd93949db1ddc277f26c27e0d613ff5fe16c7
|
||||||
F src/date.c 65b483caeb0e4dd663667d2f927caa058168ebff
|
F src/date.c b3e8b2bef1e3f2ce24e5b057203036defb18c3f1
|
||||||
F src/delete.c a5191011b7429dff939df631b8bdcc1714b8d7aa
|
F src/delete.c a5191011b7429dff939df631b8bdcc1714b8d7aa
|
||||||
F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
|
F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
|
||||||
F src/expr.c 01cdf6a632ff66acfff667932c41bb79d18d5077
|
F src/expr.c 01cdf6a632ff66acfff667932c41bb79d18d5077
|
||||||
F src/func.c 1959a0c2f5328b2b9934620f9492964f080f4a71
|
F src/func.c b7a8b55200d34bf01fe2a52462db27399f291777
|
||||||
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
||||||
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
||||||
F src/insert.c 1428887f4a7515a7d34e82aaeb76297c79ba378b
|
F src/insert.c 1428887f4a7515a7d34e82aaeb76297c79ba378b
|
||||||
F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
|
F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
|
||||||
F src/main.c 54ce5c19d64dd41381f92fa5e4610d9408c9b9a3
|
F src/main.c 5dc5012e1098a2b05decbdbc504815024737e436
|
||||||
F src/md5.c d77a389955759c8329bb357e3d71bac3d6eb710b
|
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
|
||||||
F src/os.h 1cb5f0293a30288451fe3c0c73815cf208212ed1
|
F src/os.h 1cb5f0293a30288451fe3c0c73815cf208212ed1
|
||||||
F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8
|
F src/os_common.h ba1b7306e16e2091718f2c48db0fe6c1d7a31bb8
|
||||||
F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf
|
F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf
|
||||||
@@ -56,11 +56,11 @@ F src/printf.c 823b6a5cbedb6971a9e62f5d83204fe9b0be7c1b
|
|||||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||||
F src/select.c 91570af7f13d1c5584f3b711676e1226ee12194e
|
F src/select.c 91570af7f13d1c5584f3b711676e1226ee12194e
|
||||||
F src/shell.c ca519519dcbbc582f6d88f7d0e7583b857fd3469
|
F src/shell.c ca519519dcbbc582f6d88f7d0e7583b857fd3469
|
||||||
F src/sqlite.h.in 70091409ee7013dc06f8750ca142389b61227e30
|
F src/sqlite.h.in c34414b9f5330f875e26a69fe685e38ca45f11b9
|
||||||
F src/sqliteInt.h 9cd659c9c23a6b9fa9a4dc1731994d90d8ccdaf7
|
F src/sqliteInt.h b01c438b31132816d8a4167a45c8b7dab4ff79d4
|
||||||
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
||||||
F src/tclsqlite.c 16a56baa1294cbea3cbc3131d71e7881cdee1d67
|
F src/tclsqlite.c ddef9b18271fb46344d3d35446bd7c001465a69a
|
||||||
F src/test1.c 19858f61aa20a054611131c28bce21bed88f972e
|
F src/test1.c ee426e026ad9223483e7a84bb68849fc6e9f542e
|
||||||
F src/test2.c db0a0c30b59f1639cb8c2572be06439402833cc8
|
F src/test2.c db0a0c30b59f1639cb8c2572be06439402833cc8
|
||||||
F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf
|
F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf
|
||||||
F src/test4.c a921a69821fd30209589228e64f94e9f715b6fe2
|
F src/test4.c a921a69821fd30209589228e64f94e9f715b6fe2
|
||||||
@@ -194,7 +194,7 @@ F www/arch2.gif 49c6bb36160f03ca2b89eaa5bfb1f560c7d68ee7
|
|||||||
F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0
|
F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0
|
||||||
F www/c_interface.tcl 2176519fc2bd2d2cf6fe74fd806fc2d8362de2c8
|
F www/c_interface.tcl 2176519fc2bd2d2cf6fe74fd806fc2d8362de2c8
|
||||||
F www/capi3.tcl af6938cc417fe323d7570b95d2e9a019bbff637e
|
F www/capi3.tcl af6938cc417fe323d7570b95d2e9a019bbff637e
|
||||||
F www/capi3ref.tcl 68a03fa5c15f01d04fbb073f8153078f1ba6f672
|
F www/capi3ref.tcl ae6c0ed88f601119c15de964b7b4b2f8c9b05831
|
||||||
F www/changes.tcl 4d75f4c2a8bba2bb26b0fd4f3a48999e06b4025f
|
F www/changes.tcl 4d75f4c2a8bba2bb26b0fd4f3a48999e06b4025f
|
||||||
F www/common.tcl f786e6be86fb2627ceb30e770e9efa83b9c67a3a
|
F www/common.tcl f786e6be86fb2627ceb30e770e9efa83b9c67a3a
|
||||||
F www/conflict.tcl fb8a2ba83746c7fdfd9e52fa7f6aaf5c422b8246
|
F www/conflict.tcl fb8a2ba83746c7fdfd9e52fa7f6aaf5c422b8246
|
||||||
@@ -225,7 +225,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
|
|||||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||||
F www/version3.tcl af528563442e3039928f9018327a18157e53a44f
|
F www/version3.tcl af528563442e3039928f9018327a18157e53a44f
|
||||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||||
P 327780ade9ac99470018320218f39fbbc8f21837
|
P 61819740fe8916892afe502196bb8b75a51f81e8
|
||||||
R 078ac56f136c6acfadf7a29732ae01f0
|
R cb771500bef1e49c485d208778df70b7
|
||||||
U danielk1977
|
U danielk1977
|
||||||
Z 6a0040126724f15aa7fc1543066e7d58
|
Z c1b577fd5952e65f94f6b53a7096295b
|
||||||
|
@@ -1 +1 @@
|
|||||||
61819740fe8916892afe502196bb8b75a51f81e8
|
728d57ff5517a51c3aad4ba95525b1aa2065bd19
|
@@ -16,7 +16,7 @@
|
|||||||
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
|
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
|
||||||
** All other code has file scope.
|
** All other code has file scope.
|
||||||
**
|
**
|
||||||
** $Id: date.c,v 1.29 2004/06/12 09:25:14 danielk1977 Exp $
|
** $Id: date.c,v 1.30 2004/06/19 08:18:08 danielk1977 Exp $
|
||||||
**
|
**
|
||||||
** NOTES:
|
** NOTES:
|
||||||
**
|
**
|
||||||
@@ -886,6 +886,6 @@ void sqlite3RegisterDateTimeFunctions(sqlite *db){
|
|||||||
|
|
||||||
for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){
|
for(i=0; i<sizeof(aFuncs)/sizeof(aFuncs[0]); i++){
|
||||||
sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg,
|
sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg,
|
||||||
SQLITE_UTF8, 0, 0, aFuncs[i].xFunc, 0, 0);
|
SQLITE_UTF8, 0, aFuncs[i].xFunc, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
|
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
|
||||||
** All other code has file scope.
|
** All other code has file scope.
|
||||||
**
|
**
|
||||||
** $Id: func.c,v 1.71 2004/06/17 05:36:44 danielk1977 Exp $
|
** $Id: func.c,v 1.72 2004/06/19 08:18:09 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -1066,7 +1066,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite *db){
|
|||||||
case 2: pArg = (void *)(-1); break;
|
case 2: pArg = (void *)(-1); break;
|
||||||
}
|
}
|
||||||
sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg,
|
sqlite3_create_function(db, aFuncs[i].zName, aFuncs[i].nArg,
|
||||||
aFuncs[i].eTextRep, 0, pArg, aFuncs[i].xFunc, 0, 0);
|
aFuncs[i].eTextRep, pArg, aFuncs[i].xFunc, 0, 0);
|
||||||
if( aFuncs[i].needCollSeq ){
|
if( aFuncs[i].needCollSeq ){
|
||||||
FuncDef *pFunc = sqlite3FindFunction(db, aFuncs[i].zName,
|
FuncDef *pFunc = sqlite3FindFunction(db, aFuncs[i].zName,
|
||||||
strlen(aFuncs[i].zName), aFuncs[i].nArg, aFuncs[i].eTextRep, 0);
|
strlen(aFuncs[i].zName), aFuncs[i].nArg, aFuncs[i].eTextRep, 0);
|
||||||
@@ -1082,7 +1082,7 @@ void sqlite3RegisterBuiltinFunctions(sqlite *db){
|
|||||||
case 2: pArg = (void *)(-1); break;
|
case 2: pArg = (void *)(-1); break;
|
||||||
}
|
}
|
||||||
sqlite3_create_function(db, aAggs[i].zName, aAggs[i].nArg, SQLITE_UTF8,
|
sqlite3_create_function(db, aAggs[i].zName, aAggs[i].nArg, SQLITE_UTF8,
|
||||||
0, pArg, 0, aAggs[i].xStep, aAggs[i].xFinalize);
|
pArg, 0, aAggs[i].xStep, aAggs[i].xFinalize);
|
||||||
if( aAggs[i].needCollSeq ){
|
if( aAggs[i].needCollSeq ){
|
||||||
FuncDef *pFunc = sqlite3FindFunction( db, aAggs[i].zName,
|
FuncDef *pFunc = sqlite3FindFunction( db, aAggs[i].zName,
|
||||||
strlen(aAggs[i].zName), aAggs[i].nArg, SQLITE_UTF8, 0);
|
strlen(aAggs[i].zName), aAggs[i].nArg, SQLITE_UTF8, 0);
|
||||||
|
19
src/main.c
19
src/main.c
@@ -14,7 +14,7 @@
|
|||||||
** other files are for internal use by SQLite and should not be
|
** other files are for internal use by SQLite and should not be
|
||||||
** accessed by users of the library.
|
** accessed by users of the library.
|
||||||
**
|
**
|
||||||
** $Id: main.c,v 1.228 2004/06/19 03:33:57 danielk1977 Exp $
|
** $Id: main.c,v 1.229 2004/06/19 08:18:12 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -626,13 +626,14 @@ static int sqliteDefaultBusyCallback(
|
|||||||
** This routine sets the busy callback for an Sqlite database to the
|
** This routine sets the busy callback for an Sqlite database to the
|
||||||
** given callback function with the given argument.
|
** given callback function with the given argument.
|
||||||
*/
|
*/
|
||||||
void sqlite3_busy_handler(
|
int sqlite3_busy_handler(
|
||||||
sqlite *db,
|
sqlite3 *db,
|
||||||
int (*xBusy)(void*,int),
|
int (*xBusy)(void*,int),
|
||||||
void *pArg
|
void *pArg
|
||||||
){
|
){
|
||||||
db->busyHandler.xFunc = xBusy;
|
db->busyHandler.xFunc = xBusy;
|
||||||
db->busyHandler.pArg = pArg;
|
db->busyHandler.pArg = pArg;
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||||
@@ -664,12 +665,13 @@ void sqlite3_progress_handler(
|
|||||||
** This routine installs a default busy handler that waits for the
|
** This routine installs a default busy handler that waits for the
|
||||||
** specified number of milliseconds before returning 0.
|
** specified number of milliseconds before returning 0.
|
||||||
*/
|
*/
|
||||||
void sqlite3_busy_timeout(sqlite *db, int ms){
|
int sqlite3_busy_timeout(sqlite3 *db, int ms){
|
||||||
if( ms>0 ){
|
if( ms>0 ){
|
||||||
sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms);
|
sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms);
|
||||||
}else{
|
}else{
|
||||||
sqlite3_busy_handler(db, 0, 0);
|
sqlite3_busy_handler(db, 0, 0);
|
||||||
}
|
}
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -699,7 +701,6 @@ int sqlite3_create_function(
|
|||||||
const char *zFunctionName,
|
const char *zFunctionName,
|
||||||
int nArg,
|
int nArg,
|
||||||
int enc,
|
int enc,
|
||||||
int iCollateArg,
|
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
|
||||||
void (*xStep)(sqlite3_context*,int,sqlite3_value **),
|
void (*xStep)(sqlite3_context*,int,sqlite3_value **),
|
||||||
@@ -729,10 +730,10 @@ int sqlite3_create_function(
|
|||||||
}else if( enc==SQLITE_ANY ){
|
}else if( enc==SQLITE_ANY ){
|
||||||
int rc;
|
int rc;
|
||||||
rc = sqlite3_create_function(db, zFunctionName, nArg, SQLITE_UTF8,
|
rc = sqlite3_create_function(db, zFunctionName, nArg, SQLITE_UTF8,
|
||||||
iCollateArg, pUserData, xFunc, xStep, xFinal);
|
pUserData, xFunc, xStep, xFinal);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
rc = sqlite3_create_function(db, zFunctionName, nArg, SQLITE_UTF16LE,
|
rc = sqlite3_create_function(db, zFunctionName, nArg, SQLITE_UTF16LE,
|
||||||
iCollateArg, pUserData, xFunc, xStep, xFinal);
|
pUserData, xFunc, xStep, xFinal);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
enc = SQLITE_UTF16BE;
|
enc = SQLITE_UTF16BE;
|
||||||
}
|
}
|
||||||
@@ -750,7 +751,6 @@ int sqlite3_create_function16(
|
|||||||
const void *zFunctionName,
|
const void *zFunctionName,
|
||||||
int nArg,
|
int nArg,
|
||||||
int eTextRep,
|
int eTextRep,
|
||||||
int iCollateArg,
|
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
@@ -767,7 +767,7 @@ int sqlite3_create_function16(
|
|||||||
return SQLITE_NOMEM;
|
return SQLITE_NOMEM;
|
||||||
}
|
}
|
||||||
rc = sqlite3_create_function(db, zFunc8, nArg, eTextRep,
|
rc = sqlite3_create_function(db, zFunc8, nArg, eTextRep,
|
||||||
iCollateArg, pUserData, xFunc, xStep, xFinal);
|
pUserData, xFunc, xStep, xFinal);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1282,7 +1282,6 @@ int sqlite3_create_collation16(
|
|||||||
void* pCtx,
|
void* pCtx,
|
||||||
int(*xCompare)(void*,int,const void*,int,const void*)
|
int(*xCompare)(void*,int,const void*,int,const void*)
|
||||||
){
|
){
|
||||||
int rc;
|
|
||||||
char const *zName8;
|
char const *zName8;
|
||||||
sqlite3_value *pTmp = sqlite3GetTransientValue(db);
|
sqlite3_value *pTmp = sqlite3GetTransientValue(db);
|
||||||
sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF16NATIVE, SQLITE_STATIC);
|
sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF16NATIVE, SQLITE_STATIC);
|
||||||
|
@@ -381,7 +381,7 @@ static void md5finalize(sqlite3_context *context){
|
|||||||
DigestToBase16(digest, zBuf);
|
DigestToBase16(digest, zBuf);
|
||||||
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
|
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
|
||||||
}
|
}
|
||||||
void Md5_Register(sqlite *db){
|
void Md5_Register(sqlite3 *db){
|
||||||
sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0, 0,
|
sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0,
|
||||||
md5step, md5finalize);
|
md5step, md5finalize);
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
** This header file defines the interface that the SQLite library
|
** This header file defines the interface that the SQLite library
|
||||||
** presents to client programs.
|
** presents to client programs.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqlite.h.in,v 1.103 2004/06/19 03:33:57 danielk1977 Exp $
|
** @(#) $Id: sqlite.h.in,v 1.104 2004/06/19 08:18:16 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITE_H_
|
#ifndef _SQLITE_H_
|
||||||
#define _SQLITE_H_
|
#define _SQLITE_H_
|
||||||
@@ -41,7 +41,6 @@ extern const char sqlite3_version[];
|
|||||||
** Each open sqlite database is represented by an instance of the
|
** Each open sqlite database is represented by an instance of the
|
||||||
** following opaque structure.
|
** following opaque structure.
|
||||||
*/
|
*/
|
||||||
typedef struct sqlite sqlite;
|
|
||||||
typedef struct sqlite sqlite3;
|
typedef struct sqlite sqlite3;
|
||||||
|
|
||||||
|
|
||||||
@@ -56,7 +55,7 @@ typedef struct sqlite sqlite3;
|
|||||||
** this routine is called. Otherwise, SQLITE_BUSY is returned and the
|
** this routine is called. Otherwise, SQLITE_BUSY is returned and the
|
||||||
** database connection remains open.
|
** database connection remains open.
|
||||||
*/
|
*/
|
||||||
int sqlite3_close(sqlite *);
|
int sqlite3_close(sqlite3 *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The type for a callback function.
|
** The type for a callback function.
|
||||||
@@ -104,7 +103,7 @@ typedef int (*sqlite_callback)(void*,int,char**, char**);
|
|||||||
** and sqlite3_busy_timeout() functions below.)
|
** and sqlite3_busy_timeout() functions below.)
|
||||||
*/
|
*/
|
||||||
int sqlite3_exec(
|
int sqlite3_exec(
|
||||||
sqlite*, /* An open database */
|
sqlite3*, /* An open database */
|
||||||
const char *sql, /* SQL to be executed */
|
const char *sql, /* SQL to be executed */
|
||||||
sqlite_callback, /* Callback function */
|
sqlite_callback, /* Callback function */
|
||||||
void *, /* 1st argument to callback function */
|
void *, /* 1st argument to callback function */
|
||||||
@@ -153,7 +152,7 @@ int sqlite3_exec(
|
|||||||
**
|
**
|
||||||
** This function is similar to the mysql_insert_id() function from MySQL.
|
** This function is similar to the mysql_insert_id() function from MySQL.
|
||||||
*/
|
*/
|
||||||
long long int sqlite3_last_insert_rowid(sqlite*);
|
long long int sqlite3_last_insert_rowid(sqlite3*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This function returns the number of database rows that were changed
|
** This function returns the number of database rows that were changed
|
||||||
@@ -175,7 +174,7 @@ long long int sqlite3_last_insert_rowid(sqlite*);
|
|||||||
** table. To get an accurate count of the number of rows deleted, use
|
** table. To get an accurate count of the number of rows deleted, use
|
||||||
** "DELETE FROM table WHERE 1" instead.
|
** "DELETE FROM table WHERE 1" instead.
|
||||||
*/
|
*/
|
||||||
int sqlite3_changes(sqlite*);
|
int sqlite3_changes(sqlite3*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This function returns the number of database rows that were changed
|
** This function returns the number of database rows that were changed
|
||||||
@@ -201,7 +200,7 @@ int sqlite3_changes(sqlite*);
|
|||||||
**
|
**
|
||||||
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||||
*/
|
*/
|
||||||
int sqlite3_last_statement_changes(sqlite*);
|
int sqlite3_last_statement_changes(sqlite3*);
|
||||||
|
|
||||||
/* This function causes any pending database operation to abort and
|
/* This function causes any pending database operation to abort and
|
||||||
** return at its earliest opportunity. This routine is typically
|
** return at its earliest opportunity. This routine is typically
|
||||||
@@ -209,7 +208,7 @@ int sqlite3_last_statement_changes(sqlite*);
|
|||||||
** or Ctrl-C where the user wants a long query operation to halt
|
** or Ctrl-C where the user wants a long query operation to halt
|
||||||
** immediately.
|
** immediately.
|
||||||
*/
|
*/
|
||||||
void sqlite3_interrupt(sqlite*);
|
void sqlite3_interrupt(sqlite3*);
|
||||||
|
|
||||||
|
|
||||||
/* These functions return true if the given input string comprises
|
/* These functions return true if the given input string comprises
|
||||||
@@ -247,7 +246,7 @@ int sqlite3_complete16(const void *sql);
|
|||||||
** data structures out from under the executing query and will
|
** data structures out from under the executing query and will
|
||||||
** probably result in a coredump.
|
** probably result in a coredump.
|
||||||
*/
|
*/
|
||||||
void sqlite3_busy_handler(sqlite*, int(*)(void*,int), void*);
|
int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine sets a busy handler that sleeps for a while when a
|
** This routine sets a busy handler that sleeps for a while when a
|
||||||
@@ -259,7 +258,7 @@ void sqlite3_busy_handler(sqlite*, int(*)(void*,int), void*);
|
|||||||
** Calling this routine with an argument less than or equal to zero
|
** Calling this routine with an argument less than or equal to zero
|
||||||
** turns off all busy handlers.
|
** turns off all busy handlers.
|
||||||
*/
|
*/
|
||||||
void sqlite3_busy_timeout(sqlite*, int ms);
|
int sqlite3_busy_timeout(sqlite3*, int ms);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This next routine is really just a wrapper around sqlite3_exec().
|
** This next routine is really just a wrapper around sqlite3_exec().
|
||||||
@@ -303,7 +302,7 @@ void sqlite3_busy_timeout(sqlite*, int ms);
|
|||||||
** The return value of this routine is the same as from sqlite3_exec().
|
** The return value of this routine is the same as from sqlite3_exec().
|
||||||
*/
|
*/
|
||||||
int sqlite3_get_table(
|
int sqlite3_get_table(
|
||||||
sqlite*, /* An open database */
|
sqlite3*, /* An open database */
|
||||||
const char *sql, /* SQL to be executed */
|
const char *sql, /* SQL to be executed */
|
||||||
char ***resultp, /* Result written to a char *[] that this points to */
|
char ***resultp, /* Result written to a char *[] that this points to */
|
||||||
int *nrow, /* Number of result rows written here */
|
int *nrow, /* Number of result rows written here */
|
||||||
@@ -369,7 +368,7 @@ void sqlite3_free(char *z);
|
|||||||
** if the column should be treated as a NULL value.
|
** if the column should be treated as a NULL value.
|
||||||
*/
|
*/
|
||||||
int sqlite3_set_authorizer(
|
int sqlite3_set_authorizer(
|
||||||
sqlite*,
|
sqlite3*,
|
||||||
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
|
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
|
||||||
void *pUserData
|
void *pUserData
|
||||||
);
|
);
|
||||||
@@ -428,7 +427,7 @@ int sqlite3_set_authorizer(
|
|||||||
** or sqlite3_prepare(). This function can be used (for example) to generate
|
** or sqlite3_prepare(). This function can be used (for example) to generate
|
||||||
** a log file of all SQL executed against a database.
|
** a log file of all SQL executed against a database.
|
||||||
*/
|
*/
|
||||||
void *sqlite3_trace(sqlite*, void(*xTrace)(void*,const char*), void*);
|
void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine configures a callback function - the progress callback - that
|
** This routine configures a callback function - the progress callback - that
|
||||||
@@ -456,7 +455,7 @@ void *sqlite3_trace(sqlite*, void(*xTrace)(void*,const char*), void*);
|
|||||||
**
|
**
|
||||||
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||||
*/
|
*/
|
||||||
void sqlite3_progress_handler(sqlite*, int, int(*)(void*), void*);
|
void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Register a callback function to be invoked whenever a new transaction
|
** Register a callback function to be invoked whenever a new transaction
|
||||||
@@ -471,7 +470,7 @@ void sqlite3_progress_handler(sqlite*, int, int(*)(void*), void*);
|
|||||||
**
|
**
|
||||||
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||||
*/
|
*/
|
||||||
void *sqlite3_commit_hook(sqlite*, int(*)(void*), void*);
|
void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Open the sqlite database file "filename". The "filename" is UTF-8
|
** Open the sqlite database file "filename". The "filename" is UTF-8
|
||||||
@@ -861,7 +860,6 @@ int sqlite3_create_function(
|
|||||||
const char *zFunctionName,
|
const char *zFunctionName,
|
||||||
int nArg,
|
int nArg,
|
||||||
int eTextRep,
|
int eTextRep,
|
||||||
int iCollateArg,
|
|
||||||
void*,
|
void*,
|
||||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
@@ -872,7 +870,6 @@ int sqlite3_create_function16(
|
|||||||
const void *zFunctionName,
|
const void *zFunctionName,
|
||||||
int nArg,
|
int nArg,
|
||||||
int eTextRep,
|
int eTextRep,
|
||||||
int iCollateArg,
|
|
||||||
void*,
|
void*,
|
||||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** Internal interface definitions for SQLite.
|
** Internal interface definitions for SQLite.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqliteInt.h,v 1.290 2004/06/19 03:33:57 danielk1977 Exp $
|
** @(#) $Id: sqliteInt.h,v 1.291 2004/06/19 08:18:19 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
@@ -138,6 +138,8 @@ extern const int sqlite3one;
|
|||||||
#define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
|
#define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
|
||||||
#define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
|
#define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
|
||||||
|
|
||||||
|
typedef struct sqlite sqlite;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Defer sourcing vdbe.h until after the "u8" typedef is defined.
|
** Defer sourcing vdbe.h until after the "u8" typedef is defined.
|
||||||
*/
|
*/
|
||||||
@@ -273,7 +275,6 @@ typedef struct CollSeq CollSeq;
|
|||||||
typedef struct KeyInfo KeyInfo;
|
typedef struct KeyInfo KeyInfo;
|
||||||
typedef struct BusyHandler BusyHandler;
|
typedef struct BusyHandler BusyHandler;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Each database file to be accessed by the system is an instance
|
** Each database file to be accessed by the system is an instance
|
||||||
** of the following structure. There are normally two of these structures
|
** of the following structure. There are normally two of these structures
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** A TCL Interface to SQLite
|
** A TCL Interface to SQLite
|
||||||
**
|
**
|
||||||
** $Id: tclsqlite.c,v 1.88 2004/06/19 00:16:31 drh Exp $
|
** $Id: tclsqlite.c,v 1.89 2004/06/19 08:18:21 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
|
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
|
||||||
|
|
||||||
@@ -785,7 +785,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
|||||||
pFunc->pNext = pDb->pFunc;
|
pFunc->pNext = pDb->pFunc;
|
||||||
pFunc->zScript = (char*)&pFunc[1];
|
pFunc->zScript = (char*)&pFunc[1];
|
||||||
strcpy(pFunc->zScript, zScript);
|
strcpy(pFunc->zScript, zScript);
|
||||||
sqlite3_create_function(pDb->db, zName, -1, SQLITE_UTF8, 0,
|
sqlite3_create_function(pDb->db, zName, -1, SQLITE_UTF8,
|
||||||
pFunc, tclSqlFunc, 0, 0);
|
pFunc, tclSqlFunc, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
14
src/test1.c
14
src/test1.c
@@ -13,7 +13,7 @@
|
|||||||
** is not included in the SQLite library. It is used for automated
|
** is not included in the SQLite library. It is used for automated
|
||||||
** testing of the SQLite library.
|
** testing of the SQLite library.
|
||||||
**
|
**
|
||||||
** $Id: test1.c,v 1.79 2004/06/19 03:33:57 danielk1977 Exp $
|
** $Id: test1.c,v 1.80 2004/06/19 08:18:23 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "tcl.h"
|
#include "tcl.h"
|
||||||
@@ -331,7 +331,7 @@ static int sqlite_test_close(
|
|||||||
}
|
}
|
||||||
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
||||||
rc = sqlite3_close(db);
|
rc = sqlite3_close(db);
|
||||||
Tcl_SetResult(interp, errorName(rc), TCL_STATIC);
|
Tcl_SetResult(interp, (char *)errorName(rc), TCL_STATIC);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,9 +452,9 @@ static int test_create_function(
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
||||||
sqlite3_create_function(db, "x_coalesce", -1, SQLITE_UTF8, 0, 0,
|
sqlite3_create_function(db, "x_coalesce", -1, SQLITE_UTF8, 0,
|
||||||
ifnullFunc, 0, 0);
|
ifnullFunc, 0, 0);
|
||||||
sqlite3_create_function(db, "x_sqlite3_exec", 1, SQLITE_UTF8, 0, db,
|
sqlite3_create_function(db, "x_sqlite3_exec", 1, SQLITE_UTF8, db,
|
||||||
sqlite3ExecFunc, 0, 0);
|
sqlite3ExecFunc, 0, 0);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
@@ -503,9 +503,9 @@ static int test_create_aggregate(
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
||||||
sqlite3_create_function(db, "x_count", 0, SQLITE_UTF8, 0, 0, 0,
|
sqlite3_create_function(db, "x_count", 0, SQLITE_UTF8, 0, 0,
|
||||||
countStep,countFinalize);
|
countStep,countFinalize);
|
||||||
sqlite3_create_function(db, "x_count", 1, SQLITE_UTF8, 0, 0, 0,
|
sqlite3_create_function(db, "x_count", 1, SQLITE_UTF8, 0, 0,
|
||||||
countStep,countFinalize);
|
countStep,countFinalize);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
@@ -742,7 +742,7 @@ static int test_register_func(
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
|
||||||
rc = sqlite3_create_function(db, argv[2], -1, SQLITE_UTF8, 0, 0,
|
rc = sqlite3_create_function(db, argv[2], -1, SQLITE_UTF8, 0,
|
||||||
testFunc, 0, 0);
|
testFunc, 0, 0);
|
||||||
if( rc!=0 ){
|
if( rc!=0 ){
|
||||||
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
|
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
set rcsid {$Id: capi3ref.tcl,v 1.4 2004/06/17 19:04:17 drh Exp $}
|
set rcsid {$Id: capi3ref.tcl,v 1.5 2004/06/19 08:18:27 danielk1977 Exp $}
|
||||||
source common.tcl
|
source common.tcl
|
||||||
header {C/C++ Interface For SQLite Version 3}
|
header {C/C++ Interface For SQLite Version 3}
|
||||||
puts {
|
puts {
|
||||||
@@ -95,7 +95,7 @@ api {} {
|
|||||||
special value SQLITE_STATIC, then the library assumes that the information
|
special value SQLITE_STATIC, then the library assumes that the information
|
||||||
is in static, unmanaged space and does not need to be freed. If the
|
is in static, unmanaged space and does not need to be freed. If the
|
||||||
fifth argument has the value SQLITE_TRANSIENT, then SQLite makes its
|
fifth argument has the value SQLITE_TRANSIENT, then SQLite makes its
|
||||||
on private copy of the data.
|
own private copy of the data.
|
||||||
|
|
||||||
The sqlite3_bind_*() routine must be called after
|
The sqlite3_bind_*() routine must be called after
|
||||||
sqlite3_prepare() or sqlite3_reset() and before sqlite3_step().
|
sqlite3_prepare() or sqlite3_reset() and before sqlite3_step().
|
||||||
|
Reference in New Issue
Block a user