FTS4ColumnDefinition

public final class FTS4ColumnDefinition

The FTS4ColumnDefinition class lets you refine a column of an FTS4 virtual table.

You get instances of this class when you create an FTS4 table:

try db.create(virtualTable: "document", using: FTS4()) { t in
    t.column("content")      // FTS4ColumnDefinition
}

See https://www.sqlite.org/fts3.html

  • Excludes the column from the full-text index.

    try db.create(virtualTable: "document", using: FTS4()) { t in
        t.column("a")
        t.column("b").notIndexed()
    }
    

    See https://www.sqlite.org/fts3.html#the_notindexed_option

    Declaration

    Swift

    @available(iOS 8.2, OSX 10.10, *)
    @discardableResult
    public func notIndexed() -> Self

    Return Value

    Self so that you can further refine the column definition.

  • Uses the column as the Int32 language id hidden column.

    try db.create(virtualTable: "document", using: FTS4()) { t in
        t.column("a")
        t.column("lid").asLanguageId()
    }
    

    See https://www.sqlite.org/fts3.html#the_languageid_option

    Declaration

    Swift

    @discardableResult
    public func asLanguageId() -> Self

    Return Value

    Self so that you can further refine the column definition.