cafonsomota
09/02/2019, 4:49 PMoverride fun insertItem(city_name: String, country: String?) {
driver.execute(117,
"""INSERT OR FAIL INTO locationModel(city_name, country) VALUES (?1, ?2)""", 2) {
bindString(1, city_name)
bindString(2, country)
}
notifyQueries(database.locationModelQueries.selectAll)
}
and error:
e: ...DbImpl.kt: (163, 23): Type mismatch: inferred type is MutableList<Query<*>> but Int was expected
e: ...DbImpl.kt: (163, 62): No value passed for parameter 'queryList'
and the .sq example that I’m trying to run is from a sample:
CREATE TABLE locationModel (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
city_name TEXT NOT NULL,
country TEXT
);
insertItem:
INSERT OR FAIL INTO locationModel(city_name, country) VALUES (?, ?);
selectAll:
SELECT *
FROM locationModel;
deleteItem:
DELETE FROM locationModel WHERE city_name = ?;
any ideia what I might be doing wrong?mbonnin
09/02/2019, 5:08 PMcafonsomota
09/02/2019, 5:32 PM