在 Room 插入数据后,是否可能返回 Flow<List<Long>>
呢?
比如这样:
@Insert(onConflict = REPLACE)
suspend fun insert( notesModel: List<NotesModel>): Flow<List<Long>>
当我尝试执行它时,会发生异常:
错误:不确定如何处理插入方法的返回类型。
在 Room 插入数据后,是否可能返回 Flow<List<Long>>
呢?
比如这样:
@Insert(onConflict = REPLACE)
suspend fun insert( notesModel: List<NotesModel>): Flow<List<Long>>