{"action":"opened","issue":{"url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/110","labels_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/110/comments","events_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/110/events","html_url":"https://github.com/stephencelis/SQLite.swift/issues/110","id":69404722,"number":110,"title":"Query.first has unexpected behavior","user":{"login":"sktaylor","id":297445,"avatar_url":"https://avatars.githubusercontent.com/u/297445?v=3","gravatar_id":"","url":"https://api.github.com/users/sktaylor","html_url":"https://github.com/sktaylor","followers_url":"https://api.github.com/users/sktaylor/followers","following_url":"https://api.github.com/users/sktaylor/following{/other_user}","gists_url":"https://api.github.com/users/sktaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/sktaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sktaylor/subscriptions","organizations_url":"https://api.github.com/users/sktaylor/orgs","repos_url":"https://api.github.com/users/sktaylor/repos","events_url":"https://api.github.com/users/sktaylor/events{/privacy}","received_events_url":"https://api.github.com/users/sktaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-19T09:25:09Z","updated_at":"2015-04-19T09:25:09Z","closed_at":null,"body":"```\r\nfunc get(index: Int) -> Row? {\r\n    let query = db[\"some_table\"].limit(1, offset: index);\r\n    return(query.first);\r\n}\r\n\r\nget(0) // gets row 0\r\nget(3) // gets row 0\r\n```\r\n\r\nThat 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.\r\n\r\n\r\n\r\n\r\n"}}