On Fri, 06 Jan 2017 13:48:26 -0700
"Keith Medcalf" <kmedc...@dessus.com> wrote:

> Both "glob" and "like" call the same function, likeFunc with
> different sets of user_data.  likeFunc does a bunch of validation
> then calls patternCompare which actually implements the like and glob
> functionality.  How like and glob work are documented in the preface
> to patternCompare.
> 
> like implements the standard sql like using % (0 or more) and _
> (exactly 1 char) as wildcard matches.
> 
> glob implements unix globbing using * (0 or more) and ? (exactly 1)
> as wildcard matches. "sets" of characters are indicated by  squockets
> (square brackets -- []).  Different from the standard unix glob
> however, it uses ^ to invert the sense of a set rather than an !.
> Since it is unicode, a character is [\u0000-\u10FFFF].  [^1-7] is
> equivalent to a match of any of the remaining unicode characters.

Thank you both for explaining where and how the glob functionality is
implemented.  

Along with David, I'd like to suggest this information be added to the
user documentation. Glob syntax is as much a part of SQLite's SQL
syntax as date & time functions are.  

--jkl
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to