Enumerations
The following enumerations are available globally.
-
The various identity configurations that you can use when initializing a
Ditto
instance.- development: An identity to be used while in development when you want to control either or both of the app name and the site ID of the peer.
- production: The identity to use when in production. This accepts a certificate bundle, which includes identity information, as a base 64 encoded string.
Declaration
Swift
public enum DittoIdentity
-
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.- 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
-
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