Classes

The following classes are available globally.

  • A CBLBlob appears as a property of a CBLDocument; it contains arbitrary binary data, tagged with a MIME type. Blobs can be arbitrarily large, and their data is loaded only on demand (when the content or contentStream properties are accessed), not when the document is loaded. The document’s raw JSON form only contains the CBLBlob’s metadata (type, length and a digest of the data) in a small object. The data itself is stored externally to the document, keyed by the digest.

    See more

    Declaration

    Objective-C

    @interface CBLBlob : NSObject

    Swift

    class CBLBlob : NSObject
  • Options for opening a database. All properties default to NO or nil.

    See more

    Declaration

    Objective-C

    @interface CBLDatabaseOptions : NSObject <NSCopying>

    Swift

    class CBLDatabaseOptions : NSObject, NSCopying
  • A Couchbase Lite database.

    See more

    Declaration

    Objective-C

    @interface CBLDatabase : NSObject

    Swift

    class CBLDatabase : NSObject
  • A Couchbase Lite document. A document has key/value properties like an NSDictionary; their API is defined by the protocol CBLProperties. To learn how to work with properties, see that protocol’s documentation.

    See more

    Declaration

    Objective-C

    @interface CBLDocument : CBLProperties

    Swift

    class CBLDocument : CBLProperties
  • A compiled database query. You create a query by calling the CBLDatabase method createQueryWhere:. The query can be further configured by setting properties before running it. Some properties alter the behavior of the query enough to trigger recompilation; it’s usually best to set these only once and then reuse the CBLQuery object. You can use NSPredicate / NSExpression variables to parameterize the query, making it flexible without needing recompilation. Then you just set the parameters property before running it.

    See more

    Declaration

    Objective-C

    @interface CBLPredicateQuery : NSObject

    Swift

    class CBLPredicateQuery : NSObject
  • Default implementation of CBLProperties protocol, which defines a JSON-compatible object, much like an NSMutableDictionary but with type-safe accessors. Abstract superclass of CBLDocument and (soon) CBLSubdocument.

    See more

    Declaration

    Objective-C

    @interface CBLProperties : NSObject <CBLProperties>

    Swift

    class CBLProperties : NSObject, CBLPropertiesProtocol
  • A database query. A CBLQuery instance can be constructed by calling one of the select methods.

    See more

    Declaration

    Objective-C

    @interface CBLQuery : NSObject

    Swift

    class CBLQuery : NSObject
  • A query data source. used for specifiying the data source for your query. The current data source supported is the database.

    See more

    Declaration

    Objective-C

    @interface CBLQueryDataSource : NSObject

    Swift

    class CBLQueryDataSource : NSObject
  • A database data source. You could also create an alias data source by calling the -as: method with a given alias name.

    See more

    Declaration

    Objective-C

    @interface CBLQueryDatabase : CBLQueryDataSource

    Swift

    class CBLQueryDatabase : CBLQueryDataSource
  • A CBLQueryExpression represents an expression used for constructing a query statement.

    See more

    Declaration

    Objective-C

    @interface CBLQueryExpression : NSObject

    Swift

    class CBLQueryExpression : NSObject
  • A CBLQueryOrderBy represents a query ORDER BY clause by specifying properties or expressions that the result rows should be sorted by. A CBLQueryOrderBy can be construct as a single CBLQuerySortOrder instance with a propery name or an expression instance or as a chain of multiple CBLQueryOrderBy instances.

    See more

    Declaration

    Objective-C

    @interface CBLQueryOrderBy : NSObject

    Swift

    class CBLQueryOrderBy : NSObject
  • CBLQuerySortOrder is a subclass of the CBLQueryOrderBy that allows to create an ascending or a descending CBLQueryOrderBy instance.

    See more

    Declaration

    Objective-C

    @interface CBLQuerySortOrder : CBLQueryOrderBy

    Swift

    class CBLQuerySortOrder : CBLQueryOrderBy
  • A single result from a CBLQuery. The NSEnumeration returned by -[CBLQuery run:] produces these.

    See more

    Declaration

    Objective-C

    @interface CBLQueryRow : NSObject

    Swift

    class CBLQueryRow : NSObject
  • A single result from a full-text CBLQuery.

    See more

    Declaration

    Objective-C

    @interface CBLFullTextQueryRow : CBLQueryRow

    Swift

    class CBLFullTextQueryRow : CBLQueryRow
  • A CBLQuerySelect represents the returning properties in each query result row.

    See more

    Declaration

    Objective-C

    @interface CBLQuerySelect : NSObject

    Swift

    class CBLQuerySelect : NSObject
  • A replication between a local and a target database. The target is usually remote, identified by a URL, but may instead be local. Replications are by default bidirectional; to change this, set either the push or pull property to NO before starting. The replication runs asynchronously, so set a delegate or observe the status property to be notified of progress.

    See more

    Declaration

    Objective-C

    @interface CBLReplication : NSObject

    Swift

    class CBLReplication : NSObject
  • CBLSubdocument is a suboducment or a nested document with its own set of named properties. In JSON terms it’s a nested JSON Map object. Like CBLDocument, CBLSubdocument is mutable, so you can make changes in-place. The difference is that a subdocument doesn’t have its own ID. It’s not a first-class entity in the database, it’s just a nested object within the document’s JSON. It can’t be saved individually; changes are persisted when you save its document.

    See more

    Declaration

    Objective-C

    @interface CBLSubdocument : CBLProperties

    Swift

    class CBLSubdocument : CBLProperties