CBLQueryDataSource

@interface CBLQueryDataSource : NSObject

A query data source. used for specifiying the data source for your query. The current data source supported is the database.

  • Create a database data source.

    Declaration

    Objective-C

    + (nonnull instancetype)database:(nonnull CBLDatabase *)database;

    Parameters

    database

    The database used as the data source as the query.

    Return Value

    The CBLQueryDataSource instance for the database.

  • Create a database data source with the given alias name.

    Declaration

    Objective-C

    + (nonnull instancetype)database:(nonnull CBLDatabase *)database
                                  as:(nullable NSString *)alias;

    Parameters

    database

    The database used as the data source as the query.

    alias

    The alias name of the data source.

    Return Value

    The CBLQueryDataSource instance for the database.

  • Create a collection data source.

    Declaration

    Objective-C

    + (nonnull instancetype)collection:(nonnull CBLCollection *)collection;

    Parameters

    collection

    The collection used as the data source as the query.

    Return Value

    The CBLQueryDataSource instance for the collection.

  • Create a collection data source with the given alias name.

    Declaration

    Objective-C

    + (nonnull instancetype)collection:(nonnull CBLCollection *)collection
                                    as:(nullable NSString *)alias;

    Parameters

    collection

    The collection used as the data source as the query.

    alias

    The alias name of the data source.

    Return Value

    The CBLQueryDataSource instance for the collection.

  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;