I saw examples where we can create a table with fixed name using sq
file like that
CREATE TABLE hockeyPlayer (
player_number INTEGER NOT NULL,
full_name TEXT NOT NULL
);
I need to create tables with arbitrary names at runtime, how could I achieve this?
UPD
It seems I have to execute all queries manually in this case (like it's done in generated classes)
val driver = DatabaseDriverFactory().createDriver(databaseName)
val tableName = "table2"
driver.execute(null, "CREATE TABLE IF NOT EXISTS $tableName (player_number INTEGER NOT NULL, full_name TEXT NOT NULL", 0, null)