class DittoCollection
A reference to a collection in a DittoStore.
DittoCollection(name: String, siteID: UInt, dittoHandle: SWIGTYPE_p_Ditto, objectMapper: ObjectMapper)
A reference to a collection in a DittoStore. |
val name: String
the name of the collection. |
fun find(query: String): DittoPendingCursorOperation<Map<String, Any>> fun <T : Any> find(query: String, clazz: KClass<T>): DittoPendingCursorOperation<T> fun <T : Any> find(query: String, clazz: Class<T>): DittoPendingCursorOperation<T> fun <T : Any> find(query: String, typeRef: TypeReference<T>): DittoPendingCursorOperation<T>
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 findAll(): DittoPendingCursorOperation<Map<String, Any>> fun <T : Any> findAll(clazz: KClass<T>): DittoPendingCursorOperation<T> fun <T : Any> findAll(clazz: Class<T>): DittoPendingCursorOperation<T> fun <T : Any> findAll(typeRef: TypeReference<T>): DittoPendingCursorOperation<T>
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 findByID(id: String): DittoPendingIDSpecificOperation<Map<String, Any>> fun <T : Any> findByID(id: String, clazz: KClass<T>): DittoPendingIDSpecificOperation<T> fun <T : Any> findByID(id: String, clazz: Class<T>): DittoPendingIDSpecificOperation<T> fun <T : Any> findByID(id: String, typeRef: TypeReference<T>): DittoPendingIDSpecificOperation<T>
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 <T : Any> insert(value: T, isDefault: Boolean = false): String
Inserts a new document into the collection and returns the document's ID. |
|
fun updateByID(id: String, newDocument: Map<String, Any?>): Unit
Update a document with the values provided. |