{"action":"opened","number":40,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40","id":151686228,"html_url":"https://github.com/cockroachdb/cockroachdb-python/pull/40","diff_url":"https://github.com/cockroachdb/cockroachdb-python/pull/40.diff","patch_url":"https://github.com/cockroachdb/cockroachdb-python/pull/40.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/40","number":40,"state":"open","locked":false,"title":"Implements get_foreign_keys with SHOW CONSTRAINTS","user":{"login":"rcherrueau","id":1301451,"avatar_url":"https://avatars2.githubusercontent.com/u/1301451?v=4","gravatar_id":"","url":"https://api.github.com/users/rcherrueau","html_url":"https://github.com/rcherrueau","followers_url":"https://api.github.com/users/rcherrueau/followers","following_url":"https://api.github.com/users/rcherrueau/following{/other_user}","gists_url":"https://api.github.com/users/rcherrueau/gists{/gist_id}","starred_url":"https://api.github.com/users/rcherrueau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcherrueau/subscriptions","organizations_url":"https://api.github.com/users/rcherrueau/orgs","repos_url":"https://api.github.com/users/rcherrueau/repos","events_url":"https://api.github.com/users/rcherrueau/events{/privacy}","received_events_url":"https://api.github.com/users/rcherrueau/received_events","type":"User","site_admin":false},"body":"Implementation of the get_foreign_keys method using SHOW CONSTRAINTS.\r\n\r\nNote on the referred schema: I don't know if it may appear in the\r\nDetails column of SHOW CONSTRAINT, e.g., by prefixing the referred\r\ntable name. I assume not, so the regexp doesn't try to match it.\r\n\r\nThe implementation uses `row.Type.startswith(\"FOREIGN KEY\")` to filter\r\nrows that contains foreign key constraints. It uses the `startswith`\r\nmethod to consider UNVALIDATED foreign keys. If UNVALIDATED foreign\r\nkeys should not be considered, then the implementation may use string\r\nequality instead.\r\n\r\nTested with CockroachDB  1.1.2","created_at":"2017-11-09T15:44:00Z","updated_at":"2017-11-09T15:44:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/40/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/statuses/3a0718f2b0fc6ae6e21383a7a01b824b67f31c40","head":{"label":"rcherrueau:impl-get-fk","ref":"impl-get-fk","sha":"3a0718f2b0fc6ae6e21383a7a01b824b67f31c40","user":{"login":"rcherrueau","id":1301451,"avatar_url":"https://avatars2.githubusercontent.com/u/1301451?v=4","gravatar_id":"","url":"https://api.github.com/users/rcherrueau","html_url":"https://github.com/rcherrueau","followers_url":"https://api.github.com/users/rcherrueau/followers","following_url":"https://api.github.com/users/rcherrueau/following{/other_user}","gists_url":"https://api.github.com/users/rcherrueau/gists{/gist_id}","starred_url":"https://api.github.com/users/rcherrueau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcherrueau/subscriptions","organizations_url":"https://api.github.com/users/rcherrueau/orgs","repos_url":"https://api.github.com/users/rcherrueau/repos","events_url":"https://api.github.com/users/rcherrueau/events{/privacy}","received_events_url":"https://api.github.com/users/rcherrueau/received_events","type":"User","site_admin":false},"repo":{"id":109060606,"name":"cockroachdb-python","full_name":"rcherrueau/cockroachdb-python","owner":{"login":"rcherrueau","id":1301451,"avatar_url":"https://avatars2.githubusercontent.com/u/1301451?v=4","gravatar_id":"","url":"https://api.github.com/users/rcherrueau","html_url":"https://github.com/rcherrueau","followers_url":"https://api.github.com/users/rcherrueau/followers","following_url":"https://api.github.com/users/rcherrueau/following{/other_user}","gists_url":"https://api.github.com/users/rcherrueau/gists{/gist_id}","starred_url":"https://api.github.com/users/rcherrueau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcherrueau/subscriptions","organizations_url":"https://api.github.com/users/rcherrueau/orgs","repos_url":"https://api.github.com/users/rcherrueau/repos","events_url":"https://api.github.com/users/rcherrueau/events{/privacy}","received_events_url":"https://api.github.com/users/rcherrueau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcherrueau/cockroachdb-python","description":"Python client for CockroachDB","fork":true,"url":"https://api.github.com/repos/rcherrueau/cockroachdb-python","forks_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/forks","keys_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/teams","hooks_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/hooks","issue_events_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/issues/events{/number}","events_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/events","assignees_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/assignees{/user}","branches_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/branches{/branch}","tags_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/tags","blobs_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/statuses/{sha}","languages_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/languages","stargazers_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/stargazers","contributors_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/contributors","subscribers_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/subscribers","subscription_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/subscription","commits_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/contents/{+path}","compare_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/merges","archive_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/downloads","issues_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/issues{/number}","pulls_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/pulls{/number}","milestones_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/milestones{/number}","notifications_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/labels{/name}","releases_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/releases{/id}","deployments_url":"https://api.github.com/repos/rcherrueau/cockroachdb-python/deployments","created_at":"2017-10-31T22:52:45Z","updated_at":"2017-10-31T22:52:46Z","pushed_at":"2017-11-09T15:41:08Z","git_url":"git://github.com/rcherrueau/cockroachdb-python.git","ssh_url":"git@github.com:rcherrueau/cockroachdb-python.git","clone_url":"https://github.com/rcherrueau/cockroachdb-python.git","svn_url":"https://github.com/rcherrueau/cockroachdb-python","homepage":null,"size":136,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"04ee737c03e510ebadaab4521fcaa22ed9d0cee6","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars3.githubusercontent.com/u/6748139?v=4","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":32769228,"name":"cockroachdb-python","full_name":"cockroachdb/cockroachdb-python","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars3.githubusercontent.com/u/6748139?v=4","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroachdb-python","description":"Python client for CockroachDB","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroachdb-python","forks_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/releases{/id}","deployments_url":"https://api.github.com/repos/cockroachdb/cockroachdb-python/deployments","created_at":"2015-03-24T01:40:43Z","updated_at":"2017-10-26T05:55:31Z","pushed_at":"2017-10-06T14:01:01Z","git_url":"git://github.com/cockroachdb/cockroachdb-python.git","ssh_url":"git@github.com:cockroachdb/cockroachdb-python.git","clone_url":"https://github.com/cockroachdb/cockroachdb-python.git","svn_url":"https://github.com/cockroachdb/cockroachdb-python","homepage":null,"size":135,"stargazers_count":31,"watchers_count":31,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":11,"forks":11,"open_issues":11,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40"},"html":{"href":"https://github.com/cockroachdb/cockroachdb-python/pull/40"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/40"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroachdb-python/statuses/3a0718f2b0fc6ae6e21383a7a01b824b67f31c40"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":27,"deletions":9,"changed_files":2}}
{"actor":{"display_login":"rcherrueau"}}