<How to get the affected rows in Room Database usi...
# stackoverflow
r
How to get the affected rows in Room Database using @RawQuery Im using @RawQuery to execute my query in Room Database. But i cant find a way to get the affected rows this way. I tried SELECT changes() as affected_rows and get the result through the cursor but it always return zero. My code so far (I run this code after my insert, update, delete statements). val cursor = daoUnit.query(SimpleSQLiteQuery("SELECT CHANGES() AS affected_rows")) var affectedRowCount = 0 cursor.use { innerCursor -> val affectedRowColumn =...