1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

This patch contains the beginnings of the data-typing infrastructure.

The new build-in TypeOf() function is added.  New opcodes for doing
pure text comparisons are added.  Most changes are disabled pending
the 2.6.0 release. (CVS 632)

FossilOrigin-Name: cbbc858d973c2d515c6a2464981316549a241b73
This commit is contained in:
drh
2002-06-20 11:36:48 +00:00
parent c926afbc2d
commit c9b84a1fb1
10 changed files with 497 additions and 85 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.80 2002/06/16 18:21:44 drh Exp $
** $Id: main.c,v 1.81 2002/06/20 11:36:49 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -51,6 +51,11 @@ int sqliteInitCallback(void *pDb, int argc, char **argv, char **azColName){
break;
}
case 'f': { /* File format */
/*
** file_format==1 Version 2.1.0.
** file_format==2 Version 2.2.0. Integer primary key.
** file_format==3 Version 2.6.0. Separate text and numeric datatypes.
*/
db->file_format = atoi(argv[3]);
break;
}
@@ -827,3 +832,14 @@ int sqlite_create_aggregate(
p->pUserData = pUserData;
return 0;
}
/*
** Change the datatype for all functions with a given name.
*/
int sqlite_function_type(sqlite *db, const char *zName, int dataType){
FuncDef *p = (FuncDef*)sqliteHashFind(&db->aFunc, zName, strlen(zName));
while( p ){
p->dataType = dataType;
p = p->pNext;
}
}