hello all, I’m trying to use sqldelight both on A...
# multiplatform
c
hello all, I’m trying to use sqldelight both on Android and iOS - but although everything is working fine on Android side, it seems when I attempt to generate the framework for iOS I’ve got a couple of errors on the generated db impl: example of generated insert method:
Copy code
override 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:
Copy code
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:
Copy code
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?
m
You'll might have more luck in #squarelibraries
c
thank you! it seems I was able to fix it anyway 🙂 I was using 1.1.3 on iOS and 1.1.4 on android - everything is working fine now x)