YapDatabaseSearchResultsViewTransaction

@interface YapDatabaseSearchResultsViewTransaction
    : YapDatabaseAutoViewTransaction

Undocumented

  • Returns the snippet for the given collection/key tuple.

    Note: snippets must be enabled via YapDatabaseSearchResultsViewOptions.

    Declaration

    Objective-C

    - (nullable NSString *)snippetForKey:(nonnull NSString *)key
                            inCollection:(nullable NSString *)collection;

    Swift

    func snippet(forKey key: String, inCollection collection: String?) -> String?
  • Represents the most recent search query that is providing the search results.

    Declaration

    Objective-C

    - (nonnull NSString *)query;

    Swift

    func query() -> String
  • Updates the view to include search results for the given query.

    This method will run the given query on the parent FTS extension, and then properly pipe the results into the view.

    See

    performSearchWithQueue:

    Declaration

    Objective-C

    - (void)performSearchFor:(nonnull NSString *)query;

    Swift

    func performSearch(for query: String)
  • This method works similar to performSearchFor:, but allows you to use a special search queue that gives you more control over how the search progresses.

    With a search queue, the transaction will skip intermediate queries, and always perform the most recent query in the queue.

    A search queue can also be used to abort an in-progress search.

    Declaration

    Objective-C

    - (void)performSearchWithQueue:(nonnull YapDatabaseSearchQueue *)queue;

    Swift

    func performSearch(with queue: YapDatabaseSearchQueue)