table.virtual_table_using property, closes #196

This commit is contained in:
Simon Willison 2020-11-04 19:53:32 -08:00
commit 59d8689ed0
3 changed files with 81 additions and 1 deletions

View file

@ -1430,6 +1430,12 @@ The ``detect_fts()`` method returns the associated SQLite FTS table name, if one
>> db["authors"].detect_fts()
"authors_fts"
The ``.virtual_table_using`` property reveals if a table is a virtual table. It returns ``None`` for regular tables and the upper case version of the type of virtual table otherwise. For example::
>> db["authors"].enable_fts(["name"])
>> db["authors_fts"].virtual_table_using
"FTS5"
.. _python_api_fts:
Enabling full-text search