I have 5 columns in the database, 4 of which I fill out a request from the network. I'm trying to add data to the database specifically in these 4 columns via @QUERY, because when trying to do this via @Insert (onConflict = OnConflictStrategy.REPLACE), the value in the 5th column is set to default.
I would like to insert the entire list into the column through sqlite, that is, into the "id" List <Int>, in the "first_name" List <String>, etc. ? Is this possible, if so, what would the correct syntax look like? At the moment I am filling in the data through a for loop.
Here is the request:
@Query("INSERT INTO friends_table (id, first_name, last_name, photo) VALUES (:id, :firstName, :lastName, :photo)")
suspend fun insertAll(
id: Int,
firstName: String,
lastName: String,
photo: String
)