How can I enable FTS5 in SQLite?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
waheed
Posts: 20
Joined: Mon 02 Nov 2009 19:47
Location: Kuwait

How can I enable FTS5 in SQLite?

Post by waheed » Sat 11 May 2019 06:10

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

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How can I enable FTS5 in SQLite?

Post by MaximG » Wed 15 May 2019 08:09

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.

waheed
Posts: 20
Joined: Mon 02 Nov 2009 19:47
Location: Kuwait

Re: How can I enable FTS5 in SQLite?

Post by waheed » Tue 02 Jul 2019 15:26

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

Does the new version support it?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How can I enable FTS5 in SQLite?

Post by MaximG » Wed 03 Jul 2019 10:14

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.

waheed
Posts: 20
Joined: Mon 02 Nov 2009 19:47
Location: Kuwait

Re: How can I enable FTS5 in SQLite?

Post by waheed » Wed 03 Jul 2019 18:25

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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How can I enable FTS5 in SQLite?

Post by MaximG » Thu 04 Jul 2019 12:03

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

waheed
Posts: 20
Joined: Mon 02 Nov 2009 19:47
Location: Kuwait

Re: How can I enable FTS5 in SQLite?

Post by waheed » Sun 21 Jun 2020 17:35

Has FTS5 in UniDAC for SQLite support implemented yet as you mentioned about a year ago?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How can I enable FTS5 in SQLite?

Post by MaximG » Mon 06 Jul 2020 15:26

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.

Christoph
Posts: 5
Joined: Wed 23 Jan 2013 07:24

Re: How can I enable FTS5 in SQLite?

Post by Christoph » Wed 29 Dec 2021 17:04

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

As of version 9.1.1 for RAD Studio 10.4 FTS5 is still not available
Unfortunately, I haven't been able to load the extension myself.

waheed
Posts: 20
Joined: Mon 02 Nov 2009 19:47
Location: Kuwait

Re: How can I enable FTS5 in SQLite?

Post by waheed » Wed 29 Dec 2021 17:07

Another year and another and another.

Christoph
Posts: 5
Joined: Wed 23 Jan 2013 07:24

Re: How can I enable FTS5 in SQLite?

Post by Christoph » Thu 30 Dec 2021 11:32

Ok, looks like we are not there yet:-(

In the meantime, please provide a simple cookbook on how to create fts5.dll for Windows 10 32bit and 64 bit.
Is there perhaps a link available where I can download fts5.dll.
Perhaps, devart could provide it? :-)

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How can I enable FTS5 in SQLite?

Post by MaximG » Fri 31 Dec 2021 12:13

We have made the necessary changes to support FTS5 and are currently testing the driver for each supported platform.
We'll update you on the progress.

Post Reply