Detect FTS3 extension in SQLite3

What is a SQLite query to determine if the FTS3 add-on is installed? Or can I get a list of installed extensions with an SQLite3 query? It should work with pysqlite2.

I know that I can get a list of tables using SELECT * FROM sqlite_master , I would like to get something similar for a list of extensions. I also know that CREATE VIRTUAL TABLE v USING FTS3 (t TEXT) succeeds if FTS3 is installed, but I would like to receive the request without side effects (without even creating a temporary table).

As a workaround, I opened the ":memory:" database and issued the CREATE VIRTUAL TABLE command above.

+4
source share
1 answer

There is no way to do this in SQLite at the moment; he forgets that he downloaded and cannot report it, even if he wants to (I checked the source for the code that performs the download, and the critical information describing the downloaded information is simply not saved). It is known (see the Wish List at the bottom of this page) that it would be nice to save this information, but it is not yet saved.

As a result, the only thing you can do is your current workaround - try it and see if it works. Sorry, I can’t offer anything else.

+4
source

Source: https://habr.com/ru/post/1304643/


All Articles