FTS5Tokenizer
public protocol FTS5Tokenizer : AnyObject
The protocol for FTS5 tokenizers
-
Tokenizes the text described by
pTextandnText, and notifies found tokens to thetokenCallbackfunction.It matches the
xTokenizefunction documented at https://www.sqlite.org/fts5.html#custom_tokenizersDeclaration
Swift
func tokenize(context: UnsafeMutableRawPointer?, tokenization: FTS5Tokenization, pText: UnsafePointer<Int8>?, nText: Int32, tokenCallback: @escaping FTS5TokenCallback) -> Int32Parameters
contextAn opaque pointer that is the first argument to the
tokenCallbackfunctiontokenizationThe reason why FTS5 is requesting tokenization.
pTextThe tokenized text bytes. May or may not be nul-terminated.
nTextThe number of bytes in the tokenized text.
tokenCallbackThe function to call for each found token. It matches the
xTokencallback at https://www.sqlite.org/fts5.html#custom_tokenizers
View on GitHub
Install in Dash
FTS5Tokenizer Protocol Reference