Why do we need the GLOB clause in SQLite?

后端 未结 1 1444
天命终不由人
天命终不由人 2021-01-04 11:45

I\'m an Android developer and recently came across the GLOB clause in SQLite. I cannot understand why we need GLOB given that LIKE is already in place.

Both clauses

相关标签:
1条回答
  • 2021-01-04 12:37

    Case sensitivity is useful by itself, because this works better with normal indexes.

    Additionally, GLOB supports character classes:

    Globbing rules:

    * Matches any sequence of zero or more characters.

    ? Matches exactly one character.

    [...] Matches one character from the enclosed list of characters.

    [^...] Matches one character not in the enclosed list.

    With the [...] and [^...] matching, a ] character can be included in the list by making it the first character after [ or ^. A range of characters can be specified using -. Example: [a-z] matches any single lower-case letter. To match a -, make it the last character in the list.

    0 讨论(0)
提交回复
热议问题