Find @Query DAO methods returning a synchronous result

Proprietary

A non-suspend @Query returning List<X>, X?, or a scalar runs the DB query on the calling thread — by default Room throws IllegalStateException if that's the main thread. Mark the function suspend (single-shot) or return Flow<...> / LiveData<...> (observable) so Room can dispatch the query off the main thread.

org.openrewrite.kotlin.android.FindRoomQueryWithoutLiveDataOrFlow$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.android.FindRoomQueryWithoutLiveDataOrFlow$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.