{"action":"created","issue":{"url":"https://api.github.com/repos/cloudant/sync-android/issues/307","repository_url":"https://api.github.com/repos/cloudant/sync-android","labels_url":"https://api.github.com/repos/cloudant/sync-android/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/sync-android/issues/307/comments","events_url":"https://api.github.com/repos/cloudant/sync-android/issues/307/events","html_url":"https://github.com/cloudant/sync-android/pull/307","id":163805952,"number":307,"title":"Initial Query refactor","user":{"login":"rhyshort","id":1616727,"avatar_url":"https://avatars.githubusercontent.com/u/1616727?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyshort","html_url":"https://github.com/rhyshort","followers_url":"https://api.github.com/users/rhyshort/followers","following_url":"https://api.github.com/users/rhyshort/following{/other_user}","gists_url":"https://api.github.com/users/rhyshort/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyshort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyshort/subscriptions","organizations_url":"https://api.github.com/users/rhyshort/orgs","repos_url":"https://api.github.com/users/rhyshort/repos","events_url":"https://api.github.com/users/rhyshort/events{/privacy}","received_events_url":"https://api.github.com/users/rhyshort/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ricellis","id":10698320,"avatar_url":"https://avatars.githubusercontent.com/u/10698320?v=3","gravatar_id":"","url":"https://api.github.com/users/ricellis","html_url":"https://github.com/ricellis","followers_url":"https://api.github.com/users/ricellis/followers","following_url":"https://api.github.com/users/ricellis/following{/other_user}","gists_url":"https://api.github.com/users/ricellis/gists{/gist_id}","starred_url":"https://api.github.com/users/ricellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricellis/subscriptions","organizations_url":"https://api.github.com/users/ricellis/orgs","repos_url":"https://api.github.com/users/ricellis/repos","events_url":"https://api.github.com/users/ricellis/events{/privacy}","received_events_url":"https://api.github.com/users/ricellis/received_events","type":"User","site_admin":false},"assignees":[{"login":"ricellis","id":10698320,"avatar_url":"https://avatars.githubusercontent.com/u/10698320?v=3","gravatar_id":"","url":"https://api.github.com/users/ricellis","html_url":"https://github.com/ricellis","followers_url":"https://api.github.com/users/ricellis/followers","following_url":"https://api.github.com/users/ricellis/following{/other_user}","gists_url":"https://api.github.com/users/ricellis/gists{/gist_id}","starred_url":"https://api.github.com/users/ricellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricellis/subscriptions","organizations_url":"https://api.github.com/users/ricellis/orgs","repos_url":"https://api.github.com/users/ricellis/repos","events_url":"https://api.github.com/users/ricellis/events{/privacy}","received_events_url":"https://api.github.com/users/ricellis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-05T09:17:56Z","updated_at":"2016-07-08T15:17:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudant/sync-android/pulls/307","html_url":"https://github.com/cloudant/sync-android/pull/307","diff_url":"https://github.com/cloudant/sync-android/pull/307.diff","patch_url":"https://github.com/cloudant/sync-android/pull/307.patch"},"body":"## What\r\n\r\nInitial refactor of Query code to bring the function from `IndexManager` into the `Datastore`\r\n\r\n## How\r\n\r\n- deprecate the `IndexManager`\r\n- add the `IndexManager` public methods to the datastore.\r\n- Use the SQLDatabaseQueue rather than manage the database access directly.\r\n  - Remove direct use of transaction methods, and use the `submitTransaction` method on the queue.\r\n- Move function from `IndexManager` to `QueryableDatastore` \r\n- Add a Temporary checked exception `CheckedQueryException` to be a place holder for better Query error handling.\r\n- Index Manager now just proxies calls to the `Datastore` catching and logging any exceptions and returning `null`.\r\n\r\n## Testing\r\n\r\nAll tests pass, they were also updated to use SQLDatabaseQueue rather than an executor service and SQLDatabase directly.\r\n\r\n## Notes\r\n\r\nThere is still a lot to do, hence aiming to merge this with a feature branch before continuing.\r\nThere are several `FIXME` items related to Checked Exception These will be looked at as part of improvements to Query Error handling in a later PR, before the feature branch is merged to master.\r\n\r\n## Issues\r\n\r\n\r\n* #286 \r\n* #284 \r\n"},"comment":{"url":"https://api.github.com/repos/cloudant/sync-android/issues/comments/231387537","html_url":"https://github.com/cloudant/sync-android/pull/307#issuecomment-231387537","issue_url":"https://api.github.com/repos/cloudant/sync-android/issues/307","id":231387537,"user":{"login":"rhyshort","id":1616727,"avatar_url":"https://avatars.githubusercontent.com/u/1616727?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyshort","html_url":"https://github.com/rhyshort","followers_url":"https://api.github.com/users/rhyshort/followers","following_url":"https://api.github.com/users/rhyshort/following{/other_user}","gists_url":"https://api.github.com/users/rhyshort/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyshort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyshort/subscriptions","organizations_url":"https://api.github.com/users/rhyshort/orgs","repos_url":"https://api.github.com/users/rhyshort/repos","events_url":"https://api.github.com/users/rhyshort/events{/privacy}","received_events_url":"https://api.github.com/users/rhyshort/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T15:17:19Z","updated_at":"2016-07-08T15:17:19Z","body":"api private tags to be done as part of #305"}}
{"actor":{"display_login":"rhyshort"}}