I'm using Room DB in my app and I want, in a query, to put the column name as a variable so I can manipulate it "on the go" (while calling the method).
example code ("name" suppose to be a variable represent a column):
@Query("UPDATE Products SET :name = :value WHERE prod_id = :prod_id")
int updateName(String name,String value, String prod_id);
I tried that but it does not compile, with an error that it needs to get a column and not a String.
Is there any way that even a column will be placed as a variable?