1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-22 22:13:04 +03:00

Add the sqlite3_strlike() interface, which might be useful for implementing

LIKE operators on virtual tables.

FossilOrigin-Name: e70ec71d6883f2f8fc75301ff985bccb5aa06127
This commit is contained in:
drh
2015-11-24 21:23:59 +00:00
parent ff7b22b714
commit 8b4a94adc1
6 changed files with 50 additions and 12 deletions

View File

@@ -763,6 +763,13 @@ int sqlite3_strglob(const char *zGlobPattern, const char *zString){
return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, 0)==0;
}
/*
** The sqlite3_strlike() interface.
*/
int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){
return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc)==0;
}
/*
** Count the number of times that the LIKE operator (or GLOB which is
** just a variation of LIKE) gets called. This is used for testing