diff options
author | drh <drh@noemail.net> | 2005-08-14 01:20:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-08-14 01:20:37 +0000 |
commit | 55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7 (patch) | |
tree | 8f59d79014cb49e92d37a1ebe548537b6bdbadf1 /src/sqliteInt.h | |
parent | 3d94662a062a5da6340568b5ad656c3057f053c5 (diff) | |
download | sqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.tar.gz sqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.zip |
The case_sensitive_like pragma added.
Test cases added for the LIKE optimization. (CVS 2592)
FossilOrigin-Name: 72ee21c05e618b6f46f5460f8c85779c72fe32d7
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 9cfce8a75..1d6f78b5f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.401 2005/08/12 22:56:09 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.402 2005/08/14 01:20:39 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -496,18 +496,24 @@ struct sqlite3 { ** points to a linked list of these structures. */ struct FuncDef { - char *zName; /* SQL name of the function */ - int nArg; /* Number of arguments. -1 means unlimited */ + i16 nArg; /* Number of arguments. -1 means unlimited */ u8 iPrefEnc; /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */ + u8 needCollSeq; /* True if sqlite3GetFuncCollSeq() might be called */ + u8 flags; /* Some combination of SQLITE_FUNC_* */ void *pUserData; /* User data parameter */ FuncDef *pNext; /* Next function with same name */ void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */ void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */ void (*xFinalize)(sqlite3_context*); /* Aggregate finializer */ - u8 needCollSeq; /* True if sqlite3GetFuncCollSeq() might be called */ + char zName[1]; /* SQL name of the function. MUST BE LAST */ }; /* +** Possible values for FuncDef.flags +*/ +#define SQLITE_FUNC_LIKEOPT 0x01 /* Candidate for the LIKE optimization */ + +/* ** information about each column of an SQL table is held in an instance ** of this structure. */ @@ -1576,6 +1582,8 @@ int sqlite3InvokeBusyHandler(BusyHandler*); int sqlite3FindDb(sqlite3*, Token*); void sqlite3AnalysisLoad(sqlite3*,int iDB); void sqlite3DefaultRowEst(Index*); +void sqlite3RegisterLikeFunctions(sqlite3*, int); +int sqlite3IsLikeFunction(sqlite3*,Expr*,char*); #ifdef SQLITE_SSE #include "sseInt.h" |