Getting results from arbitrary SQL statements with correct binding in SQLite.swift
The SQLite.swift documentation says about executing arbitrary SQL: let stmt = try db.prepare("SELECT id, email FROM users") for row in stmt { for (index, name) in stmt.columnNames.enumerate() { print ("\(name)=\(row[index]!)") // id: Optional(1), email: Optional("alice@mac.com") } } I wanted to get the values directly like this let stmt = try db.prepare("SELECT id, email FROM users") for row in stmt { let myInt: Int64 = row[0] // error: Cannot convert value of type 'Binding?' to specified type 'Int64' let myString: String = row[1] // error: Cannot convert value of type 'Binding?' to specified