LIKE 是大小寫有分的可以用 PRAGMA case_sensitive_like=ON; 來讓LIKE變成大小寫不分,但是只限於latin1 characters, 反之GLOB則是大小寫不分
_ 比對任一字元
%比對任意數量的字元
field GLOB pattern => glob(pattern, field)
field LIKE pattern => like(pattern, field)
函數引數位置與敘述位置剛好相反
user-defined function for GLOB/LIKE/REGEXP
GLOB => glob()
LIKE => like()
REGEXP => regexp()
APSW
Connection.createscalarfunction(name, callable[, numargs=-1])
Registers a scalar function. Scalar functions operate on one set of paramaters once.
Parameters: | - name – The string name of the function. It should be less than 255 characters
- callable – The function that will be called
- numargs – How many arguments the function takes, with -1 meaning any number
|
沒有留言:
張貼留言