{"action":"opened","number":1830,"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/1830","id":27214465,"html_url":"https://github.com/qgis/QGIS/pull/1830","diff_url":"https://github.com/qgis/QGIS/pull/1830.diff","patch_url":"https://github.com/qgis/QGIS/pull/1830.patch","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/1830","number":1830,"state":"open","locked":false,"title":"[FEATURE] Transactional editing for postgres layers","user":{"login":"manisandro","id":1298852,"avatar_url":"https://avatars.githubusercontent.com/u/1298852?v=3","gravatar_id":"","url":"https://api.github.com/users/manisandro","html_url":"https://github.com/manisandro","followers_url":"https://api.github.com/users/manisandro/followers","following_url":"https://api.github.com/users/manisandro/following{/other_user}","gists_url":"https://api.github.com/users/manisandro/gists{/gist_id}","starred_url":"https://api.github.com/users/manisandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manisandro/subscriptions","organizations_url":"https://api.github.com/users/manisandro/orgs","repos_url":"https://api.github.com/users/manisandro/repos","events_url":"https://api.github.com/users/manisandro/events{/privacy}","received_events_url":"https://api.github.com/users/manisandro/received_events","type":"User","site_admin":false},"body":"This is a re-worked patch of pull #1367. From #1367:\r\n\r\nThis pull request adds a transaction mode to a group of layers. Within these layers, edits are bypassing the QGIS edit buffer and are directly written into a database transaction. The edits are visible for layers outside the group or for external tools once the transaction is commited.\r\n\r\nFurther details in ticket #1367. \r\n\r\nCompared to the initial version in #1367, this patch does the following differently:\r\n- `QgsTransaction` is an abstract class, each provider supporting transactions provides an appropriate concrete class.\r\n- The QgsPostgresTransaction class holds the connection, the connection pool is not touched anymore.\r\n- A \"pass-through\" edit buffer is introduced to forward layer changes directly to the data provider, avoiding lots of fragile if-else code in the QgsVectorLayer\r\n- The postgres provider consistently uses the transaction connection, if in transaction mode, for all queries.\r\n\r\nA small plugin to test this is here https://github.com/manisandro/qgis-transaction-test-plugin\r\n\r\n","created_at":"2015-01-12T18:19:39Z","updated_at":"2015-01-12T18:19:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qgis/QGIS/pulls/1830/commits","review_comments_url":"https://api.github.com/repos/qgis/QGIS/pulls/1830/comments","review_comment_url":"https://api.github.com/repos/qgis/QGIS/pulls/comments/{number}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/1830/comments","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/72e5684b4c23872df8612f39b49c08cb93cdf3c0","head":{"label":"manisandro:transaction","ref":"transaction","sha":"72e5684b4c23872df8612f39b49c08cb93cdf3c0","user":{"login":"manisandro","id":1298852,"avatar_url":"https://avatars.githubusercontent.com/u/1298852?v=3","gravatar_id":"","url":"https://api.github.com/users/manisandro","html_url":"https://github.com/manisandro","followers_url":"https://api.github.com/users/manisandro/followers","following_url":"https://api.github.com/users/manisandro/following{/other_user}","gists_url":"https://api.github.com/users/manisandro/gists{/gist_id}","starred_url":"https://api.github.com/users/manisandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manisandro/subscriptions","organizations_url":"https://api.github.com/users/manisandro/orgs","repos_url":"https://api.github.com/users/manisandro/repos","events_url":"https://api.github.com/users/manisandro/events{/privacy}","received_events_url":"https://api.github.com/users/manisandro/received_events","type":"User","site_admin":false},"repo":{"id":18176399,"name":"QGIS","full_name":"manisandro/QGIS","owner":{"login":"manisandro","id":1298852,"avatar_url":"https://avatars.githubusercontent.com/u/1298852?v=3","gravatar_id":"","url":"https://api.github.com/users/manisandro","html_url":"https://github.com/manisandro","followers_url":"https://api.github.com/users/manisandro/followers","following_url":"https://api.github.com/users/manisandro/following{/other_user}","gists_url":"https://api.github.com/users/manisandro/gists{/gist_id}","starred_url":"https://api.github.com/users/manisandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manisandro/subscriptions","organizations_url":"https://api.github.com/users/manisandro/orgs","repos_url":"https://api.github.com/users/manisandro/repos","events_url":"https://api.github.com/users/manisandro/events{/privacy}","received_events_url":"https://api.github.com/users/manisandro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manisandro/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":true,"url":"https://api.github.com/repos/manisandro/QGIS","forks_url":"https://api.github.com/repos/manisandro/QGIS/forks","keys_url":"https://api.github.com/repos/manisandro/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manisandro/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manisandro/QGIS/teams","hooks_url":"https://api.github.com/repos/manisandro/QGIS/hooks","issue_events_url":"https://api.github.com/repos/manisandro/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/manisandro/QGIS/events","assignees_url":"https://api.github.com/repos/manisandro/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/manisandro/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/manisandro/QGIS/tags","blobs_url":"https://api.github.com/repos/manisandro/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manisandro/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manisandro/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/manisandro/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manisandro/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/manisandro/QGIS/languages","stargazers_url":"https://api.github.com/repos/manisandro/QGIS/stargazers","contributors_url":"https://api.github.com/repos/manisandro/QGIS/contributors","subscribers_url":"https://api.github.com/repos/manisandro/QGIS/subscribers","subscription_url":"https://api.github.com/repos/manisandro/QGIS/subscription","commits_url":"https://api.github.com/repos/manisandro/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/manisandro/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/manisandro/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/manisandro/QGIS/issues/comments/{number}","contents_url":"https://api.github.com/repos/manisandro/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/manisandro/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manisandro/QGIS/merges","archive_url":"https://api.github.com/repos/manisandro/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manisandro/QGIS/downloads","issues_url":"https://api.github.com/repos/manisandro/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/manisandro/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/manisandro/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/manisandro/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manisandro/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/manisandro/QGIS/releases{/id}","created_at":"2014-03-27T13:18:36Z","updated_at":"2015-01-12T09:34:04Z","pushed_at":"2015-01-12T18:07:37Z","git_url":"git://github.com/manisandro/QGIS.git","ssh_url":"git@github.com:manisandro/QGIS.git","clone_url":"https://github.com/manisandro/QGIS.git","svn_url":"https://github.com/manisandro/QGIS","homepage":"http://qgis.org","size":1036536,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qgis:master","ref":"master","sha":"fa903dde47f3321e048d14341d69f997357cb4cc","user":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"repo":{"id":1690480,"name":"QGIS","full_name":"qgis/QGIS","owner":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qgis/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":false,"url":"https://api.github.com/repos/qgis/QGIS","forks_url":"https://api.github.com/repos/qgis/QGIS/forks","keys_url":"https://api.github.com/repos/qgis/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qgis/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qgis/QGIS/teams","hooks_url":"https://api.github.com/repos/qgis/QGIS/hooks","issue_events_url":"https://api.github.com/repos/qgis/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/qgis/QGIS/events","assignees_url":"https://api.github.com/repos/qgis/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/qgis/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/qgis/QGIS/tags","blobs_url":"https://api.github.com/repos/qgis/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qgis/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qgis/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/qgis/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/qgis/QGIS/languages","stargazers_url":"https://api.github.com/repos/qgis/QGIS/stargazers","contributors_url":"https://api.github.com/repos/qgis/QGIS/contributors","subscribers_url":"https://api.github.com/repos/qgis/QGIS/subscribers","subscription_url":"https://api.github.com/repos/qgis/QGIS/subscription","commits_url":"https://api.github.com/repos/qgis/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/qgis/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/qgis/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/qgis/QGIS/issues/comments/{number}","contents_url":"https://api.github.com/repos/qgis/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/qgis/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qgis/QGIS/merges","archive_url":"https://api.github.com/repos/qgis/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qgis/QGIS/downloads","issues_url":"https://api.github.com/repos/qgis/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/qgis/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/qgis/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/qgis/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qgis/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/qgis/QGIS/releases{/id}","created_at":"2011-05-02T08:06:26Z","updated_at":"2015-01-12T13:57:56Z","pushed_at":"2015-01-12T13:57:56Z","git_url":"git://github.com/qgis/QGIS.git","ssh_url":"git@github.com:qgis/QGIS.git","clone_url":"https://github.com/qgis/QGIS.git","svn_url":"https://github.com/qgis/QGIS","homepage":"http://qgis.org","size":1139599,"stargazers_count":579,"watchers_count":579,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":526,"mirror_url":null,"open_issues_count":37,"forks":526,"open_issues":37,"watchers":579,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/1830"},"html":{"href":"https://github.com/qgis/QGIS/pull/1830"},"issue":{"href":"https://api.github.com/repos/qgis/QGIS/issues/1830"},"comments":{"href":"https://api.github.com/repos/qgis/QGIS/issues/1830/comments"},"review_comments":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/1830/comments"},"review_comment":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/1830/commits"},"statuses":{"href":"https://api.github.com/repos/qgis/QGIS/statuses/72e5684b4c23872df8612f39b49c08cb93cdf3c0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":812,"deletions":150,"changed_files":21}}