Page 1 of 1

How can I enable FTS5 in SQLite?

Posted: Sat 11 May 2019 06:10
by waheed
I'm using UniDAC 7.4, but I don't see where I enable FTS5 for SQLite. FTS5 is included in v.3.9 but not enabled by default except when I use "--enable-fts5" option when running the configure script. https://sqlite.org/fts5.html
But where can I enable it in UniConnection?
I'm using DirectMode=True

I found this in the documentation:

Code: Select all

UniConnection.ExecSQL('SELECT load_extension(''C:\ext.dll'', ''sqlite3_ext_init'');');
so I replaced it by:

Code: Select all

UniConnection1.ExecSQL('SELECT load_extension(''C:\sqlite\sqlite3.exe'', ''sqlite3_fts5_init'');');
But still it didn't work, it gave me (The specified procedure could not be found) error

Re: How can I enable FTS5 in SQLite?

Posted: Wed 15 May 2019 08:09
by MaximG
Please follow the steps to work with FTS5 and UniDAC in Direct Mode:

1. Compile Loadable Extension with FTS5 support as described in the docs: https://www.sqlite.org/loadext.html. On Windows, you’ll get a DLL file – you can name it fts5.dll, for example.
2. Enable support for Loadable Extension : UniConnection.SpecificOptions.Values['EnableLoadExtension'] := 'True';
3. Set the path to fts5.dll when downloading the extension (for example, to C:\fts5.dll): UniConnection.ExecSQL('SELECT load_extension(''C:\fts5.dll'', ''sqlite3_fts5_init'');');

The next version of UniDAC will support FTS5 in Direct Mode by default.

Re: How can I enable FTS5 in SQLite?

Posted: Tue 02 Jul 2019 15:26
by waheed
"The next version of UniDAC will support FTS5 in Direct Mode by default."

Does the new version support it?

Re: How can I enable FTS5 in SQLite?

Posted: Wed 03 Jul 2019 10:14
by MaximG
We were going to support FTS5 in Direct Mode in the latest version of UniDAC, however, we hadn't been able to ensure stable operation in all supported modes. For that reason, we haven't added this capability in the latest version of our driver.
We'll continue to work on adding support for FTS5 and we'll update you on the progress.

Re: How can I enable FTS5 in SQLite?

Posted: Wed 03 Jul 2019 18:25
by waheed
Anxiously waiting for it. Thanks

Meanwhile, if there is any one out there able to create a SQLite version with built-in FTS5 support enabled so I can connect to it in indirect mode, I will greatly appreciate it.

Re: How can I enable FTS5 in SQLite?

Posted: Thu 04 Jul 2019 12:03
by MaximG
We can prepare and send you a nightly build of our product with support for FTS5. What are your primary platforms (Win32, Win64, MacOS etc.)? Please send us your license key and IDE version number via e-support form https://www.devart.com/company/contactform.html

Re: How can I enable FTS5 in SQLite?

Posted: Sun 21 Jun 2020 17:35
by waheed
Has FTS5 in UniDAC for SQLite support implemented yet as you mentioned about a year ago?

Re: How can I enable FTS5 in SQLite?

Posted: Mon 06 Jul 2020 15:26
by MaximG
We're still working on adding native support for FTS5, without any extensions. Hopefully we'll release it in the next version of our components.