[yunqa.de] Re: FTS3 enhanced syntax
- From: Delphi Inspiration <delphi@xxxxxxxx>
- To: yunqa@xxxxxxxxxxxxx
- Date: Fri, 15 Oct 2010 11:05:50 +0200
On 14.10.2010 20:05, Michel Brazeau wrote:
> I am considering using DISQLite3 for full text searching. I read the
> FTS3 documentation and it mentions standard and enhanced query syntax.
>
> To be able to use parentheses, enhanced syntax is required. I could
> not find in the documentation if DISQLite3 is compiled with enhanced
> syntax or not.
As per the same FTS3 documentation, the Enhanced Query Syntax is used
only if SQLite is compiled with SQLITE_ENABLE_FTS3_PARENTHES defined.
This allows anyone to see if any SQLite library (including DISQLite3) is
compiled with the FTS3 Standard Query Syntax or the Enhanced Query
Syntax: Just see if SQLITE_ENABLE_FTS3_PARENTHES is in its list of
compile time options.
This SQL retrieves the full list of compile time options used to build
the library:
PRAGMA compile_options;
This tests for a single compile time option using SQL:
SELECT sqlite_compileoption_used('SQLITE_ENABLE_FTS3_PARENTHES');
Same as above, but using the SQLite API. This returns 1 if defined, 0
otherwise:
sqlite3_compileoption_used('SQLITE_ENABLE_FTS3_PARENTHES');
> Is DISQLite3 compiled with enhanced syntax?
DISQLite3 follows the original SQLite and is by default compiled with
the Standard Query Syntax for backwards compatibility.
If you want to enable the Enhanced Query Syntax for DISQLite3, you can
do so easily: Define the SQLITE_ENABLE_FTS3_PARENTHES preprocessor macro
and recompile the library source code. A batch file to run the C++
Builder command line compiler is included in the DISQLite3 source code
edition.
Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
http://www.freelists.org/list/yunqa
Other related posts: