ditto-lib / live.ditto

Package live.ditto

Types

DefaultLogger

object DefaultLogger : DittoLogger

DittoAttachment

Represents an attachment and can be used to insert the associated attachment into a document at a specific key.

class DittoAttachment : Closeable

DittoAttachmentFetcher

These objects are returned by calls to fetchAttachment on DittoCollections.

class DittoAttachmentFetcher

DittoAttachmentStatus

A representation of the status of an attachment.

sealed class DittoAttachmentStatus

DittoAttachmentStatusChangeHandler

Typically this will only be used if interacting with the SDK from Java. You can call fetchAttachment with an attachment token and an object that implements this interface.

interface DittoAttachmentStatusChangeHandler

DittoAttachmentToken

Serves as a token for a specific attachment that you can pass to a call to fetchAttachment on a DittoCollection.

class DittoAttachmentToken

DittoCollection

A reference to a collection in a DittoStore.

class DittoCollection

DittoConditionSource

enum class DittoConditionSource

DittoDocument

A document belonging to a DittoCollection with an inner value.

class DittoDocument

DittoDocumentPath

Provides an interface to specify a path to a key in a document that you can then call a function on to get the value at the specified key as a specific type. You obtain a DittoDocumentPath by subscripting a DittoDocument and you can then further subscript a DittoDocumentPath to further specify the key of the document that you want to get the value of.

class DittoDocumentPath

DittoIdentity

The various identity configurations that you can use when initializing a DittoKit instance.

sealed class DittoIdentity

DittoKit

DittoKit is the entry point for accessing Ditto-related functionality.

class DittoKit

DittoKitCallback

interface DittoKitCallback

DittoKitDependencies

An interface describing the dependencies required to initialise a DittoKit instance.

interface DittoKitDependencies

DittoLiveQuery

The type that is returned when calling observe on a DittoCollection object. It handles the logic for calling the event handler that is provided to the observe call.

class DittoLiveQuery

DittoLiveQueryCallback

Typically this will only be used if interacting with the SDK from Java. You can call observe or observeLocal with an object that implements this interface.

interface DittoLiveQueryCallback

DittoLiveQueryEvent

Describes the different types of event that you can receive when dealing with live queries.

sealed class DittoLiveQueryEvent

DittoLiveQueryMove

Describes the index in a list of documents that a document was previously found at (from) and the index that it can now be found at (to).

data class DittoLiveQueryMove

DittoLogger

interface DittoLogger

DittoMutableDocument

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 DittoMutableDocumentPath that 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 on DittoMutableDocumentPath to 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.

class DittoMutableDocument

DittoMutableDocumentPath

Provides an interface to specify a path to a key in a document that you can then call various update functions on. You obtain a DittoMutableDocumentPath by subscripting a DittoMutableDocument and you can then further subscript a DittoMutableDocumentPath to further specify the key of the document that you want to update.

class DittoMutableDocumentPath

DittoMutableDocumentsUpdater

Typically this will only be used if interacting with the SDK from Java. You can call update with an object that implements this interface.

interface DittoMutableDocumentsUpdater

DittoPendingCursorOperation

These objects are returned when using find-like functionality on DittoCollections. 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 call exec on the object to get an array of DittoDocuments 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 calling observe, will notify you every time there's an update to a document that matches the query you provided in the preceding find-like call. A subscription, established by calling subscribe, 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 preceding find-like call. Calling observe will generate both a subscription and a live query at the same time. If you'd like to only observe local changes then you can call observeLocal. Update and remove functionality is also exposed through this object.

class DittoPendingCursorOperation

DittoPendingIDSpecificOperation

These objects are returned when using findByID functionality on DittoCollections. You can either call exec on 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 calling observe, will notify you every time there's an update to the document with the ID you provided in the preceding findByID call. A subscription, established by calling subscribe, 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 preceding findByID call. Calling observe will generate both a subscription and a live query at the same time. If you'd like to only observe local changes then you can call observeLocal. Update and remove functionality is also exposed through this object. Update and remove functionality is also exposed through this object.

class DittoPendingIDSpecificOperation

DittoScopedWriteTransaction

DittoScopedWriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction.

class DittoScopedWriteTransaction

DittoSingleDocumentLiveQueryCallback

Typically this will only be used if interacting with the SDK from Java. You can call observe or observeLocal with an object that implements this interface.

interface DittoSingleDocumentLiveQueryCallback

DittoSingleDocumentLiveQueryEvent

Provides information about a live query event relating to a single document live query.

class DittoSingleDocumentLiveQueryEvent

DittoSingleMutableDocumentUpdater

Typically this will only be used if interacting with the SDK from Java. You can call update with an object that implements this interface.

interface DittoSingleMutableDocumentUpdater

DittoSortDirection

Describes the direction when sorting a query.

enum class DittoSortDirection

DittoStore

Provides access to DittoCollections and a write transaction API.

class DittoStore

DittoSubscription

While DittoSubscription objects 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.

class DittoSubscription : Closeable

DittoTransportCondition

enum class DittoTransportCondition

DittoTransports

Describes the transports that DittoKit can use to connect to other devices.

sealed class DittoTransports

DittoUpdateResult

Describes the result of an update operation performed on a DittoMutableDocument.

sealed class DittoUpdateResult

DittoWriteTransaction

DittoWriteTransaction exposes functionality that allows you to perform multiple operations on the store within a single write transaction. You must use the scoped function 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.

class DittoWriteTransaction

DittoWriteTransactionHandler

Typically this will only be used if interacting with the SDK from Java. You can call write on a DittoStore instance with an object that implements this interface.

interface DittoWriteTransactionHandler

DittoWriteTransactionPendingCursorOperation

These objects are returned when using findByID functionality on DittoScopedWriteTransactions. You can use them to perform updates on a document and remove or evict a document.

class DittoWriteTransactionPendingCursorOperation

DittoWriteTransactionPendingIDSpecificOperation

These objects are returned when using findByID functionality on DittoScopedWriteTransactions. You can use them to perform updates on a document and remove or evict a document.

class DittoWriteTransactionPendingIDSpecificOperation

DittoWriteTransactionResult

Describes one part of the result of a write transaction.

sealed class DittoWriteTransactionResult

DocumentPathSanitizer

object DocumentPathSanitizer

LogLevel

enum class LogLevel

MdnsPlatform

open class MdnsPlatform : MdnsPlatformRust

PeersObserver

A token returned by observePeers(). Call close() to unsubscribe this handler.

class PeersObserver : Closeable

RemotePeer

A summary snapshot of the types of connections currently active to a remote Ditto peer.

class RemotePeer

Status

class Status : StatusRust

Transport

class Transport

TransportDiagnostics

class TransportDiagnostics

Exceptions

DittoKitError

All errors that are thrown by the DittoKit SDK are wrapped as a DittoKitError. It wraps multiple different types of error that each have an associated reason.

sealed class DittoKitError : Throwable

LMDBError

data class LMDBError : Throwable