FTS5Pattern
A full text pattern that can query FTS5 virtual tables.
-
The raw pattern string. Guaranteed to be a valid FTS5 pattern.
-
Creates a pattern that matches any token found in the input string; returns nil if no pattern could be built.
FTS5Pattern(matchingAnyTokenIn: "") // nil FTS5Pattern(matchingAnyTokenIn: "foo bar") // foo OR bar
-
Creates a pattern that matches all tokens found in the input string; returns nil if no pattern could be built.
FTS5Pattern(matchingAllTokensIn: "") // nil FTS5Pattern(matchingAllTokensIn: "foo bar") // foo bar
-
Creates a pattern that matches a contiguous string; returns nil if no pattern could be built.
FTS5Pattern(matchingPhrase: "") // nil FTS5Pattern(matchingPhrase: "foo bar") // "foo bar"
-
Creates a pattern that matches a contiguous string prefix; returns nil if no pattern could be built.
FTS5Pattern(matchingPrefixPhrase: "") // nil FTS5Pattern(matchingPrefixPhrase: "foo bar") // ^"foo bar"
-
Returns a value that can be stored in the database.
-
Returns an FTS5Pattern initialized from dbValue, if it contains a suitable value.