class DittoCollection
A reference to a collection in a DittoStore.
<init> |
A reference to a collection in a DittoStore. DittoCollection(name: String, siteID: Long, dittoHandle: SWIGTYPE_p_Ditto, objectMapper: ObjectMapper) |
name |
the name of the collection. val name: String |
fetchAttachment |
Trigger an attachment to be downloaded locally to the device and observe its progress as it does so. fun fetchAttachment(token: DittoAttachmentToken, onStatusChanged: (DittoAttachmentStatus) -> Unit): DittoAttachmentFetcher fun fetchAttachment(token: DittoAttachmentToken, statusChangeHandler: DittoAttachmentStatusChangeHandler): DittoAttachmentFetcher |
find |
Generates a DittoPendingCursorOperation with the provided query that can be used to find the
documents matching the query at a point in time or you can chain a call to fun find(query: String): DittoPendingCursorOperation |
findAll |
Generates a DittoPendingCursorOperation that can be used to find all documents in the collection at
a point in time or you can chain a call to fun findAll(): DittoPendingCursorOperation |
findByID |
Generates a DittoPendingIDSpecificOperation with the provided document ID that can be used to find
the document at a point in time or you can chain a call to fun findByID(id: String): DittoPendingIDSpecificOperation |
insert |
Inserts a new document into the collection and returns the document's ID. fun <T : Any> insert(value: T, id: String? = null, isDefault: Boolean = false): String |
newAttachment |
Creates a new attachment, which can then be inserted into a document. fun newAttachment(path: String, metadata: Map<String, String> = emptyMap()): DittoAttachment? fun newAttachment(inputStream: InputStream, metadata: Map<String, String> = emptyMap()): DittoAttachment? |