Re: [sqlite] Override LIKE

2007-05-16 Thread drh
"Jonas Sandman" <[EMAIL PROTECTED]> wrote:
> 
> I want LIKE to work just as well for non-ANSI characters, I think the
> solution is to override LIKE with sqlite3_create_function but is there any
> examples on how to use this function?
> 

The built-in LIKE operator is created using the sqlite3_create_function()
interface.  Why don't you use it as an example.  You will find the
code in the func.c source file.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Override LIKE

2007-05-16 Thread Martin Jenkins

Jonas Sandman wrote:

> I am using LIKE to make a simple query for filename '%path%' and it
> works well as long as I am only using ANSI characters, LIKE thinks
> 'a' and 'A' are the same. When coming up on Greek characters (i.e.)
> it doesn't work that well anymore. Suddenly LIKE is case-sensitive
> (since LIKE use some binary comparison perhaps? I duno)

Does LIKE use collation sequences? If so,

http://www.sqlite.org/capi3ref.html#sqlite3_create_collation

might help.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]
-