I use SQLite.swift and want to replace the question marks in a statement. This can be done for single entries like this:
let stmt = db.prepare("INSERT INTO users (email) VALUES (?)")
for email in ["betty@icloud.com", "cathy@icloud.com"] {
stmt.run(email)
}
I did not see how I can do the following to use a array like:
var values:[String] = ["test1","test2", "test3"]
in a Statement like:
let stmt = db.prepare("SELECT * from users where email in (?)")
The following does not work:
stmt.run(values)
How do I use an NSArray as an argument for a statement?