{"action":"created","comment":{"url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/comments/175431096","pull_request_review_id":104957041,"id":175431096,"diff_hunk":"@@ -37,11 +37,9 @@ data Result a\n schemasToSave :: M.Map Version UUID -> [(Version, a)] -> [(Version, a)]\n schemasToSave known = filter (not . (`M.member` known) . fst)\n \n-saveSchema ::\n-     Connection -> (Version, EventTypeSchema) -> SqlMonad (Version, UUID)\n-saveSchema conn (version, schema@TableSchema {}) = do\n-  ctx <- liftIO $ readIORef (context conn)\n-  Just uuid <- liftIO nextUUID\n+saveSchema :: Context -> (Version, EventTypeSchema) -> SqlMonad (Version, UUID)","path":"src/Jerimum/Storage/PostgreSQL/Service.hs","position":25,"original_position":25,"commit_id":"bcc45edfeb17b7b85f74e7e78765422a8effa2f3","original_commit_id":"c5059be6671133ddc3a8ae229c266fe6a3dd0fed","user":{"login":"thalesmg","id":16166434,"avatar_url":"https://avatars2.githubusercontent.com/u/16166434?v=4","gravatar_id":"","url":"https://api.github.com/users/thalesmg","html_url":"https://github.com/thalesmg","followers_url":"https://api.github.com/users/thalesmg/followers","following_url":"https://api.github.com/users/thalesmg/following{/other_user}","gists_url":"https://api.github.com/users/thalesmg/gists{/gist_id}","starred_url":"https://api.github.com/users/thalesmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thalesmg/subscriptions","organizations_url":"https://api.github.com/users/thalesmg/orgs","repos_url":"https://api.github.com/users/thalesmg/repos","events_url":"https://api.github.com/users/thalesmg/events{/privacy}","received_events_url":"https://api.github.com/users/thalesmg/received_events","type":"User","site_admin":false},"body":"Já que agora o `SqlMonad` é um `ReaderT` agora, estas funções não poderiam ser tipo `(Version, EventTypeSchema) -> SqlMonad (Version, UUID)` e começar com `ctx <- getContext`, onde `getContext = liftIO . readIORef <$> reader context` ?\r\n \r\nFaz sentido?","created_at":"2018-03-19T13:23:27Z","updated_at":"2018-03-19T13:23:27Z","html_url":"https://github.com/dgvncsz0f/jerimum/pull/35#discussion_r175431096","pull_request_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/comments/175431096"},"html":{"href":"https://github.com/dgvncsz0f/jerimum/pull/35#discussion_r175431096"},"pull_request":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35","id":175420299,"html_url":"https://github.com/dgvncsz0f/jerimum/pull/35","diff_url":"https://github.com/dgvncsz0f/jerimum/pull/35.diff","patch_url":"https://github.com/dgvncsz0f/jerimum/pull/35.patch","issue_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/35","number":35,"state":"open","locked":false,"title":"SqlMonad is `ExceptT ... (ReaderT ... IO)`","user":{"login":"dgvncsz0f","id":220470,"avatar_url":"https://avatars3.githubusercontent.com/u/220470?v=4","gravatar_id":"","url":"https://api.github.com/users/dgvncsz0f","html_url":"https://github.com/dgvncsz0f","followers_url":"https://api.github.com/users/dgvncsz0f/followers","following_url":"https://api.github.com/users/dgvncsz0f/following{/other_user}","gists_url":"https://api.github.com/users/dgvncsz0f/gists{/gist_id}","starred_url":"https://api.github.com/users/dgvncsz0f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgvncsz0f/subscriptions","organizations_url":"https://api.github.com/users/dgvncsz0f/orgs","repos_url":"https://api.github.com/users/dgvncsz0f/repos","events_url":"https://api.github.com/users/dgvncsz0f/events{/privacy}","received_events_url":"https://api.github.com/users/dgvncsz0f/received_events","type":"User","site_admin":false},"body":"add another monad layer in `SqlMonad` to make available the postgres connection. the new monad now provides a `runSqlM` that replaces `withTransaction` and includes an additional function, `performTxn` that wraps the following block in a transaction and works within the monad.\r\n\r\nthis patch also includes the tests for `Storage.PostgreSQL.Setup` module.","created_at":"2018-03-16T01:35:30Z","updated_at":"2018-03-19T13:23:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68cf597bdf04f53511c5bb3b4604bf162ce6a6de","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35/commits","review_comments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35/comments","review_comment_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/35/comments","statuses_url":"https://api.github.com/repos/dgvncsz0f/jerimum/statuses/bcc45edfeb17b7b85f74e7e78765422a8effa2f3","head":{"label":"dgvncsz0f:storage-tests","ref":"storage-tests","sha":"bcc45edfeb17b7b85f74e7e78765422a8effa2f3","user":{"login":"dgvncsz0f","id":220470,"avatar_url":"https://avatars3.githubusercontent.com/u/220470?v=4","gravatar_id":"","url":"https://api.github.com/users/dgvncsz0f","html_url":"https://github.com/dgvncsz0f","followers_url":"https://api.github.com/users/dgvncsz0f/followers","following_url":"https://api.github.com/users/dgvncsz0f/following{/other_user}","gists_url":"https://api.github.com/users/dgvncsz0f/gists{/gist_id}","starred_url":"https://api.github.com/users/dgvncsz0f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgvncsz0f/subscriptions","organizations_url":"https://api.github.com/users/dgvncsz0f/orgs","repos_url":"https://api.github.com/users/dgvncsz0f/repos","events_url":"https://api.github.com/users/dgvncsz0f/events{/privacy}","received_events_url":"https://api.github.com/users/dgvncsz0f/received_events","type":"User","site_admin":false},"repo":{"id":77625029,"name":"jerimum","full_name":"dgvncsz0f/jerimum","owner":{"login":"dgvncsz0f","id":220470,"avatar_url":"https://avatars3.githubusercontent.com/u/220470?v=4","gravatar_id":"","url":"https://api.github.com/users/dgvncsz0f","html_url":"https://github.com/dgvncsz0f","followers_url":"https://api.github.com/users/dgvncsz0f/followers","following_url":"https://api.github.com/users/dgvncsz0f/following{/other_user}","gists_url":"https://api.github.com/users/dgvncsz0f/gists{/gist_id}","starred_url":"https://api.github.com/users/dgvncsz0f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgvncsz0f/subscriptions","organizations_url":"https://api.github.com/users/dgvncsz0f/orgs","repos_url":"https://api.github.com/users/dgvncsz0f/repos","events_url":"https://api.github.com/users/dgvncsz0f/events{/privacy}","received_events_url":"https://api.github.com/users/dgvncsz0f/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgvncsz0f/jerimum","description":"postgres time machine","fork":false,"url":"https://api.github.com/repos/dgvncsz0f/jerimum","forks_url":"https://api.github.com/repos/dgvncsz0f/jerimum/forks","keys_url":"https://api.github.com/repos/dgvncsz0f/jerimum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgvncsz0f/jerimum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgvncsz0f/jerimum/teams","hooks_url":"https://api.github.com/repos/dgvncsz0f/jerimum/hooks","issue_events_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/events{/number}","events_url":"https://api.github.com/repos/dgvncsz0f/jerimum/events","assignees_url":"https://api.github.com/repos/dgvncsz0f/jerimum/assignees{/user}","branches_url":"https://api.github.com/repos/dgvncsz0f/jerimum/branches{/branch}","tags_url":"https://api.github.com/repos/dgvncsz0f/jerimum/tags","blobs_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgvncsz0f/jerimum/statuses/{sha}","languages_url":"https://api.github.com/repos/dgvncsz0f/jerimum/languages","stargazers_url":"https://api.github.com/repos/dgvncsz0f/jerimum/stargazers","contributors_url":"https://api.github.com/repos/dgvncsz0f/jerimum/contributors","subscribers_url":"https://api.github.com/repos/dgvncsz0f/jerimum/subscribers","subscription_url":"https://api.github.com/repos/dgvncsz0f/jerimum/subscription","commits_url":"https://api.github.com/repos/dgvncsz0f/jerimum/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgvncsz0f/jerimum/contents/{+path}","compare_url":"https://api.github.com/repos/dgvncsz0f/jerimum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgvncsz0f/jerimum/merges","archive_url":"https://api.github.com/repos/dgvncsz0f/jerimum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgvncsz0f/jerimum/downloads","issues_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues{/number}","pulls_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls{/number}","milestones_url":"https://api.github.com/repos/dgvncsz0f/jerimum/milestones{/number}","notifications_url":"https://api.github.com/repos/dgvncsz0f/jerimum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgvncsz0f/jerimum/labels{/name}","releases_url":"https://api.github.com/repos/dgvncsz0f/jerimum/releases{/id}","deployments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/deployments","created_at":"2016-12-29T16:25:15Z","updated_at":"2018-03-14T22:38:27Z","pushed_at":"2018-03-16T01:35:31Z","git_url":"git://github.com/dgvncsz0f/jerimum.git","ssh_url":"git@github.com:dgvncsz0f/jerimum.git","clone_url":"https://github.com/dgvncsz0f/jerimum.git","svn_url":"https://github.com/dgvncsz0f/jerimum","homepage":"","size":425,"stargazers_count":1,"watchers_count":1,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"dgvncsz0f:master","ref":"master","sha":"f7fbb6081276b3b4b85a3bc61c7b0c0b5c180dd0","user":{"login":"dgvncsz0f","id":220470,"avatar_url":"https://avatars3.githubusercontent.com/u/220470?v=4","gravatar_id":"","url":"https://api.github.com/users/dgvncsz0f","html_url":"https://github.com/dgvncsz0f","followers_url":"https://api.github.com/users/dgvncsz0f/followers","following_url":"https://api.github.com/users/dgvncsz0f/following{/other_user}","gists_url":"https://api.github.com/users/dgvncsz0f/gists{/gist_id}","starred_url":"https://api.github.com/users/dgvncsz0f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgvncsz0f/subscriptions","organizations_url":"https://api.github.com/users/dgvncsz0f/orgs","repos_url":"https://api.github.com/users/dgvncsz0f/repos","events_url":"https://api.github.com/users/dgvncsz0f/events{/privacy}","received_events_url":"https://api.github.com/users/dgvncsz0f/received_events","type":"User","site_admin":false},"repo":{"id":77625029,"name":"jerimum","full_name":"dgvncsz0f/jerimum","owner":{"login":"dgvncsz0f","id":220470,"avatar_url":"https://avatars3.githubusercontent.com/u/220470?v=4","gravatar_id":"","url":"https://api.github.com/users/dgvncsz0f","html_url":"https://github.com/dgvncsz0f","followers_url":"https://api.github.com/users/dgvncsz0f/followers","following_url":"https://api.github.com/users/dgvncsz0f/following{/other_user}","gists_url":"https://api.github.com/users/dgvncsz0f/gists{/gist_id}","starred_url":"https://api.github.com/users/dgvncsz0f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgvncsz0f/subscriptions","organizations_url":"https://api.github.com/users/dgvncsz0f/orgs","repos_url":"https://api.github.com/users/dgvncsz0f/repos","events_url":"https://api.github.com/users/dgvncsz0f/events{/privacy}","received_events_url":"https://api.github.com/users/dgvncsz0f/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgvncsz0f/jerimum","description":"postgres time machine","fork":false,"url":"https://api.github.com/repos/dgvncsz0f/jerimum","forks_url":"https://api.github.com/repos/dgvncsz0f/jerimum/forks","keys_url":"https://api.github.com/repos/dgvncsz0f/jerimum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgvncsz0f/jerimum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgvncsz0f/jerimum/teams","hooks_url":"https://api.github.com/repos/dgvncsz0f/jerimum/hooks","issue_events_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/events{/number}","events_url":"https://api.github.com/repos/dgvncsz0f/jerimum/events","assignees_url":"https://api.github.com/repos/dgvncsz0f/jerimum/assignees{/user}","branches_url":"https://api.github.com/repos/dgvncsz0f/jerimum/branches{/branch}","tags_url":"https://api.github.com/repos/dgvncsz0f/jerimum/tags","blobs_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgvncsz0f/jerimum/statuses/{sha}","languages_url":"https://api.github.com/repos/dgvncsz0f/jerimum/languages","stargazers_url":"https://api.github.com/repos/dgvncsz0f/jerimum/stargazers","contributors_url":"https://api.github.com/repos/dgvncsz0f/jerimum/contributors","subscribers_url":"https://api.github.com/repos/dgvncsz0f/jerimum/subscribers","subscription_url":"https://api.github.com/repos/dgvncsz0f/jerimum/subscription","commits_url":"https://api.github.com/repos/dgvncsz0f/jerimum/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgvncsz0f/jerimum/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgvncsz0f/jerimum/contents/{+path}","compare_url":"https://api.github.com/repos/dgvncsz0f/jerimum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgvncsz0f/jerimum/merges","archive_url":"https://api.github.com/repos/dgvncsz0f/jerimum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgvncsz0f/jerimum/downloads","issues_url":"https://api.github.com/repos/dgvncsz0f/jerimum/issues{/number}","pulls_url":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls{/number}","milestones_url":"https://api.github.com/repos/dgvncsz0f/jerimum/milestones{/number}","notifications_url":"https://api.github.com/repos/dgvncsz0f/jerimum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgvncsz0f/jerimum/labels{/name}","releases_url":"https://api.github.com/repos/dgvncsz0f/jerimum/releases{/id}","deployments_url":"https://api.github.com/repos/dgvncsz0f/jerimum/deployments","created_at":"2016-12-29T16:25:15Z","updated_at":"2018-03-14T22:38:27Z","pushed_at":"2018-03-16T01:35:31Z","git_url":"git://github.com/dgvncsz0f/jerimum.git","ssh_url":"git@github.com:dgvncsz0f/jerimum.git","clone_url":"https://github.com/dgvncsz0f/jerimum.git","svn_url":"https://github.com/dgvncsz0f/jerimum","homepage":"","size":425,"stargazers_count":1,"watchers_count":1,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35"},"html":{"href":"https://github.com/dgvncsz0f/jerimum/pull/35"},"issue":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/35"},"comments":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/dgvncsz0f/jerimum/statuses/bcc45edfeb17b7b85f74e7e78765422a8effa2f3"}},"author_association":"OWNER"}}
{"actor":{"display_login":"thalesmg"}}