ditto-lib / live.ditto / DittoLiveQuery

DittoLiveQuery

class DittoLiveQuery<T : Any> : LiveQueryHandlerRust, Closeable

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.

Properties

collectionName

val collectionName: String

the name of the collection that the live query is based on.

id

var id: Int

limit

val limit: Int

the maximum number of documents that will be returned as part of any one invocation of the closure provided.

offset

val offset: Int

the number of documents to offset the query results by.

query

val query: String

the query that the live query is based on.

Functions

close

fun close(): Unit

eventHandler

fun eventHandler(documents: SWIGTYPE_p_p_Ditto_Document?, document_count: Long, is_initial: Boolean, old_documents: SWIGTYPE_p_p_Ditto_Document?, old_document_count: Long, insertions: SWIGTYPE_p_uintptr_t?, insertion_count: Long, deletions: SWIGTYPE_p_uintptr_t?, deletion_count: Long, updates: SWIGTYPE_p_uintptr_t?, update_count: Long, moves: SWIGTYPE_p_uintptr_t?, move_count: Long): Unit