ditto / live.ditto / DittoWriteTransactionPendingCursorOperation / sort

sort

fun sort(query: String, direction: DittoSortDirection): DittoWriteTransactionPendingCursorOperation

Sort the documents that match the query provided in the preceding find-like function call.

Parameters

query - the query specifies the logic to be used when sorting the matching documents.

direction - specify whether you want the sorting order to be ascending or descending.

Return
a DittoWriteTransactionPendingCursorOperation that you can chain further function calls and then either get the matching documents immediately or get updates about them over time.