FTS5TableDefinition
The FTS5TableDefinition class lets you define columns of a FTS5 virtual table.
You don’t create instances of this class. Instead, you use the Database
create(virtualTable:using:)
method:
try db.create(virtualTable: "document", using: FTS5()) { t in // t is FTS5TableDefinition
t.column("content")
}
-
The virtual table tokenizer
try db.create(virtualTable: "document", using: FTS5()) { t in t.tokenizer = .porter() }
See https://www.sqlite.org/fts5.html#fts5_table_creation_and_initialization
-
The FTS5
content
optionWhen you want the full-text table to be synchronized with the content of an external table, prefer the
synchronize(withTable:)
method.Setting this property invalidates any synchronization previously established with the
synchronize(withTable:)
method.See https://www.sqlite.org/fts5.html#external_content_and_contentless_tables
-
The FTS5
content_rowid
optionWhen you want the full-text table to be synchronized with the content of an external table, prefer the
synchronize(withTable:)
method.Setting this property invalidates any synchronization previously established with the
synchronize(withTable:)
method. -
Support for the FTS5
prefix
option -
Support for the FTS5
columnsize
option -
Support for the FTS5
detail
option -
Appends a table column.
try db.create(virtualTable: "document", using: FTS5()) { t in t.column("content") }
-
Synchronizes the full-text table with the content of an external table.
The full-text table is initially populated with the existing content in the external table. SQL triggers make sure that the full-text table is kept up to date with the external table.