Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila

Dan provided the solution. Thanks!

---
It's because by default the "[" character is treated as a
punctuation or separator character and ignored. As a result
the FTS query "[*" is equivalent to "" - which always returns
zero rows.

You can change the set of characters treated a punctuation
by changing using a different tokenizer:

  http://www.sqlite.org/fts3.html#tokenizer

For example, to treat both "[" and "]" as part of tokens instead
of punctuation:

  CREATE VIRTUAL TABLE xyz USING fts4(tokenize=unicode61 
"tokenchars=[]");


---




On 2014-02-12 11:05, Richard Hipp wrote:

On Wed, Feb 12, 2014 at 4:57 AM, Attila  wrote:


I tried that one as well.



SQLite has no built-in MATCH function.  If you want to use the MATCH
syntax, then you need to register your own MATCH function using
sqlite3_create_function().


--
Attila
@xyzones
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 4:57 AM, Attila  wrote:

> I tried that one as well.
>

SQLite has no built-in MATCH function.  If you want to use the MATCH
syntax, then you need to register your own MATCH function using
sqlite3_create_function().
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila

I tried that one as well.

On 2014-02-12 10:26, Hick Gunter wrote:

Maybe you should be using single quotes as string delimiters?

-Ursprüngliche Nachricht-
Von: Attila [mailto:dex...@xyzones.org]
Gesendet: Mittwoch, 12. Februar 2014 10:18
An: sqlite-users@sqlite.org
Betreff: [sqlite] MATCH and ESCAPE

Hello,

Based on http://www.sqlite.org/lang_expr.html#match first diagram i
would expect that MATCH "\[*" ESCAPE "\" to work. Actually it return
Error: wrong number of arguments to function MATCH()

Could you please advise?


Thanks,

Attila

--
Attila
@xyzones
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


--
 Gunter Hick
Software Engineer
Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna, Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This e-mail is confidential and may well also be legally privileged.
If you have received it in error, you are on notice as to its status
and accordingly please notify us immediately by reply e-mail and then
delete this message from your system. Please do not copy it or use it
for any purposes, or disclose its contents to any person as to do so
could be a breach of confidence. Thank you for your cooperation.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


--
Attila
@xyzones
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 4:17 AM, Attila  wrote:

> Hello,
>
> Based on http://www.sqlite.org/lang_expr.html#match first diagram i would
> expect that MATCH "\[*" ESCAPE "\" to work. Actually it return Error: wrong
> number of arguments to function MATCH()
>
> Could you please advise?
>

The syntax  "a MATCH b"  means the same thing as "MATCH(b,a)" and "a MATCH
b ESCAPE c" means the same thing as "MATCH(b,a,c,)".  If you are getting an
error on the latter, it means that whatever "match" function you registered
only accepts two arguments, not three.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MATCH and ESCAPE

2014-02-12 Thread Hick Gunter
Maybe you should be using single quotes as string delimiters?

-Ursprüngliche Nachricht-
Von: Attila [mailto:dex...@xyzones.org]
Gesendet: Mittwoch, 12. Februar 2014 10:18
An: sqlite-users@sqlite.org
Betreff: [sqlite] MATCH and ESCAPE

Hello,

Based on http://www.sqlite.org/lang_expr.html#match first diagram i would 
expect that MATCH "\[*" ESCAPE "\" to work. Actually it return
Error: wrong number of arguments to function MATCH()

Could you please advise?


Thanks,

Attila

--
Attila
@xyzones
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


--
 Gunter Hick
Software Engineer
Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna, Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This e-mail is confidential and may well also be legally privileged. If you 
have received it in error, you are on notice as to its status and accordingly 
please notify us immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any person as to do so could be a breach of confidence. Thank you 
for your cooperation.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] MATCH and ESCAPE

2014-02-12 Thread Attila

Hello,

Based on http://www.sqlite.org/lang_expr.html#match first diagram i 
would expect that MATCH "\[*" ESCAPE "\" to work. Actually it return 
Error: wrong number of arguments to function MATCH()


Could you please advise?


Thanks,

Attila

--
Attila
@xyzones
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users