Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update header comments & documentation #791

Merged
merged 1 commit into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/extra/fts3/FMDatabase+FTS3.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ extern NSString *const kFTSCommandAutoMerge; // "automerge=%u"
+ (void)registerTokenizer:(id<FMTokenizerDelegate>)tokenizer withKey:(NSString *)key;

/**
Calls the `fts3_tokenizer()` function on this database, installing tokenizer module with the 'fmdb' name.
Calls the @c fts3_tokenizer function on this database, installing tokenizer module with the 'fmdb' name.
*/
- (BOOL)installTokenizerModule;

/**
Calls the `fts3_tokenizer()` function on this database, installing the tokenizer module with specified name.
Calls the @c fts3_tokenizer function on this database, installing the tokenizer module with specified name.
*/
- (BOOL)installTokenizerModuleWithName:(NSString *)name;

Expand Down Expand Up @@ -89,8 +89,8 @@ typedef struct FMTokenizerCursor

/**
Enumerate each set of offsets in the result. The column number can be turned into a column name
using `[FMResultSet columnNameForIndex:]`. The `matchRange` is in UTF-8 byte positions, so it must be
modified to use with `NSString` data.
using `[FMResultSet columnNameForIndex:]`. The @c matchRange is in UTF-8 byte positions, so it must be
modified to use with @c NSString data.
*/
- (void)enumerateWithBlock:(void (^)(NSInteger columnNumber, NSInteger termNumber, NSRange matchRange))block;

Expand All @@ -102,12 +102,12 @@ typedef struct FMTokenizerCursor
@interface FMResultSet (FTS3)

/**
Returns a structure containing values from the `offsets()` function. Make sure the column index corresponds
Returns a structure containing values from the @c offsets function. Make sure the column index corresponds
to the column index in the SQL query.

@param columnIdx Zero-based index for column.

@return `FMTextOffsets` structure.
@return @c FMTextOffsets structure.
*/
- (FMTextOffsets *)offsetsForColumnIndex:(int)columnIdx;

Expand Down
12 changes: 10 additions & 2 deletions src/extra/fts3/FMTokenizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ NS_ASSUME_NONNULL_BEGIN

/**
Create the tokenizer with a given locale. The locale will be used to initialize the string tokenizer and to lowercase the parsed word.
The locale can be `NULL`, in which case the current locale will be used.


@param locale The locale used by the simple tokenizer. The locale can be @c NULL , in which case the current locale will be used.
*/
- (instancetype)initWithLocale:(CFLocaleRef _Nullable)locale;

Expand All @@ -35,12 +37,18 @@ NS_ASSUME_NONNULL_BEGIN

/**
Load a stop-word tokenizer using a file containing words delimited by newlines. The file should be encoded in UTF-8.

@param wordFileURL The file URL for the list of words.
@param tokenizer The @c FMTokenizerDelegate .
@param error The @c NSError if there was any error reading the file.
*/
+ (instancetype)tokenizerWithFileURL:(NSURL *)wordFileURL baseTokenizer:(id<FMTokenizerDelegate>)tokenizer error:(NSError * _Nullable *)error;

/**
Initialize an instance of the tokenizer using the set of words. The words should be lowercase if you're using the
Initialize an instance of the tokenizer using the set of words. The words should be lowercase if you're using the
`FMSimpleTokenizer` as the base.
@param words The @c NSSet of words.
@param tokenizer The @c FMTokenizerDelegate .
*/
- (instancetype)initWithWords:(NSSet *)words baseTokenizer:(id<FMTokenizerDelegate>)tokenizer;

Expand Down
Loading