Classes
The following classes are available globally.
-
Configuration for the database backend that
See moreDittoStoreuses. Currently this is LMDB.Declaration
Swift
public class DittoDBConfig -
See moreDittoKitis the entry point for accessing Ditto-related functionality.Declaration
Swift
public class DittoKit -
Represents an attachment and can be used to insert the associated attachment into a document at a specific key.
See moreDeclaration
Swift
public class DittoAttachment : CBOREncodable, Hashable -
These objects are returned by calls to
See morefetchAttachmentonDittoCollections. They must be kept alive for the fetching of the attachment to proceed and for you to be notified once the status of the fetch request has changed.Declaration
Swift
public class DittoAttachmentFetcher -
Serves as a token for a specific attachment that you can pass to a call to
See morefetchAttachmenton aDittoCollection.Declaration
Swift
public class DittoAttachmentToken : Equatable -
A reference to a collection in a
See moreDittoStore.Declaration
Swift
public class DittoCollection -
A document belonging to a
See moreDittoCollectionwith an inner value.Declaration
Swift
public class DittoDocumentextension DittoDocument: CustomStringConvertible, CustomDebugStringConvertibleextension DittoDocument: Identifiable -
The type that is returned when calling when calling
See moreobserveorobserveLocalon aDittoPendingCursorOperationobject. It handles the logic for calling the event handler that is provided toobserveorobserveLocalcalls.DittoLiveQueryobjects must be kept in scope for as long as you with to have your event handler be called when there is an update to a document matching the query you provide.Declaration
Swift
public class DittoLiveQuery -
This is used as part of update operations for documents. It provides access to updating a document through a subscript-based API. A subscript operation returns a
See moreDittoMutableDocumentPaththat you can then use to chain further subscript operations to in order to access nested values in a document. Once you’ve defined the path to a key in a document that you’d like to update, by using subscripts, then you can use the functionality defined onDittoMutableDocumentPathto perform the desired document update(s). Note that objects of this type should only be used within the scope of the update closure that they are provided in.Declaration
Swift
public class DittoMutableDocument -
These objects are returned when using
See morefind-like functionality onDittoCollections. They allow chaining of further query-related functions to do things like add a limit to the number of documents you want returned or specify how you want the documents to be sorted and ordered. You can either callexecon the object to get an array ofDittoDocuments as an immediate return value, or you can establish either a live query or a subscription, which both work over time. A live query, established by callingobserve, will notify you every time there’s an update to a document that matches the query you provided in the precedingfind-like call. A subscription, established by callingsubscribe, will act as a signal to other peers that the device connects to that you would like to receive updates from them about documents that match the query you provided in the precedingfind-like call. Callingobservewill generate both a subscription and a live query at the same time. If you’d like to only observe local changes then you can callobserveLocal. Update and remove functionality is also exposed through this object.Declaration
Swift
public class DittoPendingCursorOperation -
These objects are returned when using
See morefindByIDfunctionality onDittoCollections. You can either callexecon the object to get an immediate return value, or you can establish either a live query or a subscription, which both work over time. A live query, established by callingobserve, will notify you every time there’s an update to the document with the ID you provided in the precedingfindByIDcall. A subscription, established by callingsubscribe, will act as a signal to other peers that you would like to receive updates from them about the document with the ID you provided in the precedingfindByIDcall. Callingobservewill generate both a subscription and a live query at the same time. If you’d like to only observe local changes then you can callobserveLocal. Update and remove functionality is also exposed through this object.Declaration
Swift
public class DittoPendingIDSpecificOperation -
See moreDittoScopedWriteTransactionexposes functionality that allows you to perform multiple operations on the store within a single write transaction.Declaration
Swift
public class DittoScopedWriteTransaction -
See moreDittoStoreprovides access toDittoCollections and a write transaction API.Declaration
Swift
public class DittoStore -
Used to subscribe to receive updates from remote peers about matching documents.
While
See moreDITSubscriptionobjects remain in scope they ensure that documents in the collection specified and that match the query provided will try to be kept up-to-date with the latest changes from remote peers.Declaration
Swift
public class DittoSubscription -
A document belonging to a
See moreDittoCollectionwith an inner typed value.Declaration
Swift
public class DittoTypedDocument<T> where T : Decodable -
See moreDittoWriteTransactionexposes functionality that allows you to perform multiple operations on the store within a single write transaction. You must use thescopedfunction to get collection-scoped access to the write transaction object, which will then allow you to perform insert, update, remove or evict operations using the write transaction.Declaration
Swift
public class DittoWriteTransaction -
These objects are returned when using
See morefindandfindAllfunctionality onDittoScopedWriteTransactions. You can use them to perform updates on documents and remove or evict documents.Declaration
Swift
public class DittoWriteTransactionPendingCursorOperation -
These objects are returned when using
See morefindByIDfunctionality onDittoScopedWriteTransactions. You can use them to perform updates on a document and remove or evict a document.Declaration
Swift
public class DittoWriteTransactionPendingIDSpecificOperation -
Undocumented
See moreDeclaration
Swift
public class DittoTransportDiagnostics -
Undocumented
See moreDeclaration
Swift
public class DittoTransportSnapshot
Classes Reference