package com.example.hand.data; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import an
I want to fetch data from room table using a search query and present the result in LazyColumn instead of the someList I present there. In other words, how to i
This is my migration change: Basically rename and then update some values based on the row id where isNext = 1. I suppose I need to use a Cursor as shown in thi
I am getting the following error when I build my application Not sure how to convert a Cursor to this method's return type (kotlinx.coroutines.flow.Flow<? ex
If we declare a db operation with @Query("..") fun itemList(): List<Item>, we must make sure that the code runs on a background thread. If we declare it a
I am doing a db get operation for my cart page which has multiple tables. I have mapper class which has all the relations with all the tables. I have used corou
I have a Room DB setup in my app and it was working well until recently when the app started crashing. It happens that I have a boolean value as a field in the
I apologize in advance if the question seems incomprehensible, since android development and kotlin are not my main stack. I will try to explain in as clear a l
error: [MissingType]: Element 'xxxxx.AppDatabase.room' references a type that is not present I get the mentioned error in the title when I try to compile my cod
I have a Room database that returns a Flow of objects. When I insert a new item into the database, the Flow's collect function only triggers if the insert was p
I solved this issue with the code below in my build.gradle allprojects { configurations.all { resolutionStrategy { force 'org.xerial:sqlite-jdbc:3
I'm trying to update the source of a Flow in Kotlin and I'm not sure if this is the right approach and if it's possible with Flow at all. I have a database cont
I'm trying to query Room database(action 1) and then based on the returned results perform another action on the same table. however I noticed that every time I
I write an application with room database and I have a problem with reading data and use it in the mine thread. consider tables as those: Table1 | ID | Name |
Recently I saw this - Most data sources already provide main-safe APIs like the suspend method calls provided by Room or Retrofit. Your repository can take adva
I have 30 users displayed in a LazyColumn. On user click, I navigate forward to UserDetailsScreen. My question, is it better to pass the ID of the user and crea
@Query("Select * From Mstudent where (strftime('%d%m',dob)) = :todayDate order by (strftime('%d%m',dob))") List<Mstudent> getStudentByBirthDate(Da
I'm new to coding, put already in a lot of hours and feel like I'm progressing step by step. However, I've encountered a problem that I was not able to solve ev
I have an alert dialog that pops up when the user clicks the delete button. Alert dialog When the user clicks yes, I want the recyclerview item they selected to
I want to delete all from my table and reset autoincrement primary key. I do this : @Query("delete from sqlite_sequence where name='bin';") void delete(); @