-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
func get(index: Int) -> Row? {
let query = db["some_table"].limit(1, offset: index);
return(query.first);
}
get(0) // gets row 0
get(3) // gets row 0
That behavior seems unexpected, it took me a while to figure it out. The problem is that first reruns the query with limit(1) and discards the offset: var generator = limit(1).generate(). Thanks for a great library.