This is not so much a GRDB issue as a swift type problem. I've tried sever of things to get this right and just can't come up with anything that works. I also tried asking on the Apple Developers forum but no resolution there. Can anyone tell me how to resolve this or a better way to code this? When I try to assign rowsFetched I get a type mismatched?
Thanks
I have the following function:
func getAllCustomers() -> NSArray {
var rowsFetched: NSArray
do {
try dbQueue.read { db in
-
let custlist = try Customers.fetchAll(db)*
-
} catch {rowsFetched = cultist* ---->>> gets a type mismatch } }
print("(error)")
}
return(rowsFetched)
}