]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add the sqlite3_strglob() interface.
authordrh <drh@noemail.net>
Wed, 10 Apr 2013 16:13:38 +0000 (16:13 +0000)
committerdrh <drh@noemail.net>
Wed, 10 Apr 2013 16:13:38 +0000 (16:13 +0000)
FossilOrigin-Name: 41d6ff32a6dd1311dc3aabe5156335a64a886919

manifest
manifest.uuid
src/func.c
src/sqlite.h.in

index a97a3489279eb179e54b9730ca311bfaee01e59a..5efbde65d625103b5a8bfcf9e2c0d5f4439d92c1 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Use\ssymbolic\snames\sfor\stasks\sin\smptester.
-D 2013-04-10T12:01:21.074
+C Add\sthe\ssqlite3_strglob()\sinterface.
+D 2013-04-10T16:13:38.085
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 3dd3fcb87b70c78d99b2c8a03e44ec86d6ca9ce2
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -139,7 +139,7 @@ F src/delete.c aeabdabeeeaa0584127f291baa9617153d334778
 F src/expr.c 48048fca951eedbc74aa32262154410d56c83812
 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
 F src/fkey.c e16942bd5c8a868ac53287886464a5ed0e72b179
-F src/func.c 48987c025d69399f59a1c2a553cea5da41bf105d
+F src/func.c d3fdcff9274bc161152e67ed3f626841c247f4b9
 F src/global.c d2494a1cea8f66a2cab8258449df07f8f0ae6330
 F src/hash.c ac3470bbf1ca4ae4e306a8ecb0fdf1731810ffe4
 F src/hash.h 8890a25af81fb85a9ad7790d32eedab4b994da22
@@ -182,7 +182,7 @@ F src/resolve.c 9079da7d59aed2bb14ec8315bc7f720dd85b5b65
 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
 F src/select.c 01540bcd3df3c8f1187158e77986028b1c667258
 F src/shell.c 319b7791cee6c763b60fde1b590bfaf62613cf37
-F src/sqlite.h.in 5fdc866a06ac82fd3c6ccb9f59a100151a36568c
+F src/sqlite.h.in 90b4c427a6d67b15a469cfd907405de516e36e10
 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
 F src/sqlite3ext.h 7183ab832e23db0f934494f16928da127a571d75
 F src/sqliteInt.h 1c517a89cfdba28084093607ec79af70359c7f9b
@@ -1050,7 +1050,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 4c7d9e1ed8722e0c75b5fdbeffb9030ccef0bd64
-R f44444aacae5f7c52822e030959d44b9
+P f0d95afc73f8dbce8943dceb4a14b7de650c8823
+R 98c7ddae1a722b08cd7989e28c30adec
 U drh
-Z f26dfaa28d7c4e704618af941a7b95f6
+Z 0b357dfedb1b0f83bb0de889b4353615
index e0711c6d5638d0779eb801a3e61edf21a7da19d9..2be4ede1308f8bfba36009dfa456c727aa0f59a8 100644 (file)
@@ -1 +1 @@
-f0d95afc73f8dbce8943dceb4a14b7de650c8823
\ No newline at end of file
+41d6ff32a6dd1311dc3aabe5156335a64a886919
\ No newline at end of file
index 0fce95904fca451d54eb53117a8e48c4489340d6..e40fdad55a8ea113751f252d069f54732189ba65 100644 (file)
@@ -693,6 +693,13 @@ static int patternCompare(
   return *zString==0;
 }
 
+/*
+** The sqlite3_strglob() interface.
+*/
+int sqlite3_strglob(const char *zGlobPattern, const char *zString){
+  return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, 0)==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
index 74cecbcf22dd8f7305b5248201e92b79f1d157fe..8638e5453e1b776eb620399dc57d4704e90a8f94 100644 (file)
@@ -6837,6 +6837,21 @@ int sqlite3_unlock_notify(
 int sqlite3_stricmp(const char *, const char *);
 int sqlite3_strnicmp(const char *, const char *, int);
 
+/*
+** CAPI3REF: String Globbing
+*
+** ^The [sqlite3_strglob(P,X)] interface returns zero if string X matches
+** the glob pattern P, and it returns non-zero if string X does not match
+** the glob pattern P.  ^The definition of glob pattern matching used in
+** [sqlite3_strglob(P,X) is the same as for the "X GLOB P" operator in the
+** SQL dialect used by SQLite.  ^The sqlite3_strglob(P,X) function is case
+** sensitive.
+**
+** Note that this routine returns zero on a match and non-zero if the strings
+** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
+*/
+int sqlite3_strglob(const char *zGlob, const char *zStr);
+
 /*
 ** CAPI3REF: Error Logging Interface
 **