aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-11-25 01:57:42 +0000
committerdrh <drh@noemail.net>2015-11-25 01:57:42 +0000
commitd4a3ce49d7e09cadc43308ae4545f1039f9cf84f (patch)
treeb2c88af14500478947eedec7977ffbd39de9b6f5 /src/func.c
parent5a8d190b9ecf9e38857bfa77440a4e9c91aa28e3 (diff)
parent8b4a94adc1dea3254a7eed1e33c210509c496e2d (diff)
downloadsqlite-d4a3ce49d7e09cadc43308ae4545f1039f9cf84f.tar.gz
sqlite-d4a3ce49d7e09cadc43308ae4545f1039f9cf84f.zip
Enhancement the virtual table interface to support LIKE, GLOB, and REGEXP
operators. Also add the sqlite3_strlike() interface, which might be useful as part of the implementation of LIKE on some virtual tables. FossilOrigin-Name: a6bfd4692c3f8b107546fbcaeb985d2c1817b3c1
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/func.c b/src/func.c
index 8ea116932..b134c1a7c 100644
--- a/src/func.c
+++ b/src/func.c
@@ -764,6 +764,13 @@ int sqlite3_strglob(const char *zGlobPattern, const char *zString){
}
/*
+** 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
** only.