Mar 19, 2022
```
@Insert(onConflict = IGNORE)
abstract suspend fun insert(comic: ComicEntity): Long
@Transaction
open suspend fun upsert(comic: ComicEntity) {
insert(comic)
.takeIf { it == -1L }
?.let { update(comic) }
}
```
```
@Insert(onConflict = IGNORE)
abstract suspend fun insert(comic: ComicEntity): Long
@Transaction
open suspend fun upsert(comic: ComicEntity) {
insert(comic)
.takeIf { it == -1L }
?.let { update(comic) }
}
```