find

abstract fun find(): T

Returns the value of a scalar query as a T in a blocking fashion. The result may be of a different type depending on the type of query:

  • [count] returns Long

  • [sum] returns the type specified in the call to said function

It is not recommended launching heavy queries from the UI thread as it may result in a drop of frames or even ANRs. Use asFlow to obtain results of such queries asynchroneously instead.

Return

a T containing the result of the scalar query.