Enumerations
The following enumerations are available globally.
-
The various identity configurations that you can use when initializing a
Ditto
instance.- development: (Deprecated - use
offlinePlayground
instead) Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development. - offlinePlayground: Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
- online: (Deprecated - use
onlineWithAuthentication
instead) Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed. - onlineWithAuthentication: Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
- onlinePlayground: Test a Ditto Cloud app without authentication (“Playground mode”). This mode offers no security and must only be used for development.
- sharedKey: A mode where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted.
- manual: A manually-provided certificate identity. This accepts a base64-encoded bundle.
Declaration
Swift
public enum DittoIdentity
- development: (Deprecated - use
-
Enum that maps to an appropiate prefix for a log message.
See moreDeclaration
Swift
public enum DittoLogLevel : Int
-
All errors that are thrown by the Ditto SDK are wrapped as a
DittoSwiftError
. It wraps multiple different types of error that each have an associated reason.You can access more specific information about an error by switching over the error’s
reason
value. If you want a human-readable version of the error then calllocalizedDescription
on the error’s reason.- activationError: An error occurred relating to activating the Ditto instance.
- authenticationError: An error occurred relating to authenticating the Ditto instance.
- storeError: An error occurred relating to the store.
- transportError: An error occurred relating to the network transports.
Declaration
Swift
public enum DittoSwiftError : Error
extension DittoSwiftError: LocalizedError
-
A representation of the events that can occur in relation to an attachment fetch.
There are three different attachment fetch events:
completed
,progress
, ordeleted
.There will be at most one
completed
ordeleted
event per attachment fetch. There can be manyprogress
events delivered for each attachment fetch.Updates relating to an attachment fetch are delivered by registering a
See moreDittoAttachmentFetcher
through a call tofetchAttachment
on aDittoCollection
instance.Declaration
Swift
public enum DittoAttachmentFetchEvent
-
Describes the different types of event that you can receive when dealing with live queries.
- initial: The first event that will be delivered and it will only be delivered once.
- update: This event will be delivered each time the results of the provided query change. It contains information about the set of documents that previously matched the query before the update, along with information about what documents have been inserted, deleted, updated, or moved, as part of the set of matching documents.
Declaration
Swift
public enum DittoLiveQueryEvent
extension DittoLiveQueryEvent: CustomStringConvertible, CustomDebugStringConvertible
-
Describes the direction when sorting a query.
See moreDeclaration
Swift
public enum DittoSortDirection
-
Describes the result of an update operation performed on a
DittoMutableDocument
.- set: Describes the
set
update that was performed. - removed: Describes the
remove
update that was performed. - replacedWithCounter: Describes the
replaceWithCounter
update that was performed. - incremented: Describes the
increment
update that was performed. - pushed: Describes the
push
update that was performed. - popped: Describes the
pop
update that was performed. - inserted: Describes the
insert
update that was performed.
Declaration
Swift
public enum DittoUpdateResult
- set: Describes the
-
Defines the various strategies available when inserting a document into a collection.
See moreDeclaration
Swift
public enum DittoWriteStrategy
-
Describes one part of the result of a write transaction.
- inserted: Describes a document that has been inserted, referencing its ID and the collection it was inserted into.
- updated: Describes a document that has been updated, referencing its ID and the collection it belongs to.
- evicted: Describes a document that has been evicted, referencing its ID and the collection it belonged to.
- removed: Describes a document that has been removed, referencing its ID and the collection it belonged to.
Declaration
Swift
public enum DittoWriteTransactionResult
-
Undocumented
See moreDeclaration
Swift
public enum LMDBError : Equatable
-
Undocumented
See moreDeclaration
Swift
public indirect enum CBOR : Equatable, Hashable, ExpressibleByNilLiteral, ExpressibleByIntegerLiteral, ExpressibleByStringLiteral, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral, ExpressibleByBooleanLiteral, ExpressibleByFloatLiteral
-
Describes the condition that one of the transports that Ditto uses can be in at a given point in time.
See moreDeclaration
Swift
public enum DittoTransportCondition : UInt32, CustomStringConvertible
-
The subsystem which is reporting a condition change.
See moreDeclaration
Swift
public enum DittoConditionSource : UInt32, CustomStringConvertible