{"action":"created","issue":{"url":"https://api.github.com/repos/democracyworks/election-works/issues/20","labels_url":"https://api.github.com/repos/democracyworks/election-works/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/democracyworks/election-works/issues/20/comments","events_url":"https://api.github.com/repos/democracyworks/election-works/issues/20/events","html_url":"https://github.com/democracyworks/election-works/pull/20","id":109156233,"number":20,"title":"make datomic conn / db args in entity ns","user":{"login":"cap10morgan","id":59748,"avatar_url":"https://avatars.githubusercontent.com/u/59748?v=3","gravatar_id":"","url":"https://api.github.com/users/cap10morgan","html_url":"https://github.com/cap10morgan","followers_url":"https://api.github.com/users/cap10morgan/followers","following_url":"https://api.github.com/users/cap10morgan/following{/other_user}","gists_url":"https://api.github.com/users/cap10morgan/gists{/gist_id}","starred_url":"https://api.github.com/users/cap10morgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cap10morgan/subscriptions","organizations_url":"https://api.github.com/users/cap10morgan/orgs","repos_url":"https://api.github.com/users/cap10morgan/repos","events_url":"https://api.github.com/users/cap10morgan/events{/privacy}","received_events_url":"https://api.github.com/users/cap10morgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ericnormand","id":116172,"avatar_url":"https://avatars.githubusercontent.com/u/116172?v=3","gravatar_id":"","url":"https://api.github.com/users/ericnormand","html_url":"https://github.com/ericnormand","followers_url":"https://api.github.com/users/ericnormand/followers","following_url":"https://api.github.com/users/ericnormand/following{/other_user}","gists_url":"https://api.github.com/users/ericnormand/gists{/gist_id}","starred_url":"https://api.github.com/users/ericnormand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericnormand/subscriptions","organizations_url":"https://api.github.com/users/ericnormand/orgs","repos_url":"https://api.github.com/users/ericnormand/repos","events_url":"https://api.github.com/users/ericnormand/events{/privacy}","received_events_url":"https://api.github.com/users/ericnormand/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-09-30T18:54:20Z","updated_at":"2015-10-02T15:55:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/democracyworks/election-works/pulls/20","html_url":"https://github.com/democracyworks/election-works/pull/20","diff_url":"https://github.com/democracyworks/election-works/pull/20.diff","patch_url":"https://github.com/democracyworks/election-works/pull/20.patch"},"body":"This makes it *much* easier to use the election entity namespace from a\r\nREPL connected to the production Datomic transactor. I needed to do this\r\nto find and delete an election that was cancelled.\r\n\r\nI think in general we should try to limit our usage of the stateful\r\ndatomic-toolbox fns and instead take datomic connections and db's as\r\nargs to functions as much as possible."},"comment":{"url":"https://api.github.com/repos/democracyworks/election-works/issues/comments/145070059","html_url":"https://github.com/democracyworks/election-works/pull/20#issuecomment-145070059","issue_url":"https://api.github.com/repos/democracyworks/election-works/issues/20","id":145070059,"user":{"login":"ericnormand","id":116172,"avatar_url":"https://avatars.githubusercontent.com/u/116172?v=3","gravatar_id":"","url":"https://api.github.com/users/ericnormand","html_url":"https://github.com/ericnormand","followers_url":"https://api.github.com/users/ericnormand/followers","following_url":"https://api.github.com/users/ericnormand/following{/other_user}","gists_url":"https://api.github.com/users/ericnormand/gists{/gist_id}","starred_url":"https://api.github.com/users/ericnormand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericnormand/subscriptions","organizations_url":"https://api.github.com/users/ericnormand/orgs","repos_url":"https://api.github.com/users/ericnormand/repos","events_url":"https://api.github.com/users/ericnormand/events{/privacy}","received_events_url":"https://api.github.com/users/ericnormand/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T15:55:48Z","updated_at":"2015-10-02T15:55:48Z","body":"Plus I agree with the notion that we should be passing in the db/connection.\r\n\r\nFor reads, pass in the db.\r\n\r\nFor updates, pass in the connection. If it needs to read *and* update (which is often the case), we should use `datomic-toolbox.transaction/swap-tx!` (which takes just the connection)."}}