I used sqlite
in my previous application to create a database. now I want to create a new application using Room library
. I have a problem where I have more than 100 tables. do I have to declare all my tables in class one by one for all my tables using @Entity
annotation? can I make tables and inserts use rawquery
like what I did in sqlite
such as like this :
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE IF NOT EXISTS APP_VERSION(
ID INTEGER PRIMARY KEY,
LAST_UPDATE TEXT");
}
and can I using rawquery
for insert like this :
INSERT INTO table_name
VALUES (value1, value2, value3, ...);