upsertUsers

abstract suspend fun upsertUsers(users: List<UserEntity>)

This will update all columns (or insert a new record), except:

An upsert operation is a one that tries to update a record and if fails (not rows affected by change) inserts instead. In this case as the transaction can be executed many times, we need to take care for not deleting old data.