sort

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

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

Return

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

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.