I read a specific row in my database. I used the filter query but all I get is the following:
Table(clauses: SQLite.QueryClauses(select: (false, [SQLite.Expression<()>(template: "*", bindings: [])]), from: ("users", nil, nil), join: [], filters: Optional(SQLite.Expression<Swift.Optional<Swift.Bool>>(template: "(\"id\" = ?)", bindings: [Optional(6523)])), group: nil, order: [], limit: nil))
This is my query:
let query = users.filter(id == 6523)
print(query)
Where is my mistake?
Ok, sorted the issue myself. I used the prepare function. See code below
let query = users.filter(id == 6523)
for user in try db.prepare(query) {
print("id: \(user[name])")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With