Benefit All Lifters 03 : suspend keyword in DAO - @Query that returns LiveData


Case 01 : Suspend Keyword




CoroutinesRoom.execute



Case 02 : LiveData<T>

@Query("SELECT * FROM user ORDER BY userId DESC")
fun getAllUsers(): LiveData<List<User>>
// generated Database_Impl.java
@Override
public LiveData<List<User>> getAllUsers() {
	//...
	return __db.getInvalidationTracker().createLiveData(...)
}