GitHub PullRequestReviewCommentEvent at 2014-11-17 16:15:10
Repository: sql-layer-adapter-dbapi
Actor: ScottDugas
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/comments/20444829","id":20444829,"diff_hunk":"@@ -372,15 +376,53 @@ def cursor(self, nested=False):\n \n bind_adapters = _adapt_dict()\n \n-def datetime_to_sql(dt):\n-    return dt.isoformat()\n+def adapt_date(value):\n+    return DBAPI_EXT.AsIs(\"'%s'\" % value.isoformat())\n \n-def date_to_sql(dt):\n-    return dt.isoformat()\n+def adapt_time(value):\n+    return DBAPI_EXT.AsIs(\"'%s'\" % value.strftime(\"%H:%M:%S\"))\n+\n+def adapt_datetime(value):\n+    return DBAPI_EXT.AsIs(\"'%s'\" % value.isoformat())\n+\n+def adapt_psycopg2_date(ts):\n+    return adapt_date(ts.adapted)\n+\n+def adapt_psycopg2_timestamp(ts):\n+    return adapt_datetime(ts.adapted)\n+\n+def adapt_buffer(b):\n+    hex_str = binascii.hexlify(b)","path":"foundationdb_sql/psycopg2.py","position":40,"original_position":48,"commit_id":"0e2b37b9b3ab410fcab15a5d9862c9fbc6fdf9e7","original_commit_id":"a002da75fb256c3e31bdca85e78ed9cbb575c3fa","user":{"login":"ScottDugas","id":45810,"avatar_url":"https://avatars.githubusercontent.com/u/45810?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottDugas","html_url":"https://github.com/ScottDugas","followers_url":"https://api.github.com/users/ScottDugas/followers","following_url":"https://api.github.com/users/ScottDugas/following{/other_user}","gists_url":"https://api.github.com/users/ScottDugas/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottDugas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottDugas/subscriptions","organizations_url":"https://api.github.com/users/ScottDugas/orgs","repos_url":"https://api.github.com/users/ScottDugas/repos","events_url":"https://api.github.com/users/ScottDugas/events{/privacy}","received_events_url":"https://api.github.com/users/ScottDugas/received_events","type":"User","site_admin":false},"body":"I don't think that would be outlandish. I don't know how bind_adapters works exactly. Might be worth just adding a None to the test though.","created_at":"2014-11-17T16:15:10Z","updated_at":"2014-11-17T16:15:10Z","html_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4#discussion_r20444829","pull_request_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/comments/20444829"},"html":{"href":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4#discussion_r20444829"},"pull_request":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4","id":24542219,"html_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4","diff_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4.diff","patch_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4.patch","issue_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/4","number":4,"state":"open","locked":false,"title":"Add psycopg2 type overrides to DBAPI","user":{"login":"hchandl","id":3086362,"avatar_url":"https://avatars.githubusercontent.com/u/3086362?v=3","gravatar_id":"","url":"https://api.github.com/users/hchandl","html_url":"https://github.com/hchandl","followers_url":"https://api.github.com/users/hchandl/followers","following_url":"https://api.github.com/users/hchandl/following{/other_user}","gists_url":"https://api.github.com/users/hchandl/gists{/gist_id}","starred_url":"https://api.github.com/users/hchandl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hchandl/subscriptions","organizations_url":"https://api.github.com/users/hchandl/orgs","repos_url":"https://api.github.com/users/hchandl/repos","events_url":"https://api.github.com/users/hchandl/events{/privacy}","received_events_url":"https://api.github.com/users/hchandl/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-17T15:21:31Z","updated_at":"2014-11-17T16:15:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17a5bb914378b02011f57186c124a8180f2c6a62","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4/commits","review_comments_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4/comments","review_comment_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/comments/{number}","comments_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/4/comments","statuses_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/statuses/0e2b37b9b3ab410fcab15a5d9862c9fbc6fdf9e7","head":{"label":"hchandl:types","ref":"types","sha":"0e2b37b9b3ab410fcab15a5d9862c9fbc6fdf9e7","user":{"login":"hchandl","id":3086362,"avatar_url":"https://avatars.githubusercontent.com/u/3086362?v=3","gravatar_id":"","url":"https://api.github.com/users/hchandl","html_url":"https://github.com/hchandl","followers_url":"https://api.github.com/users/hchandl/followers","following_url":"https://api.github.com/users/hchandl/following{/other_user}","gists_url":"https://api.github.com/users/hchandl/gists{/gist_id}","starred_url":"https://api.github.com/users/hchandl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hchandl/subscriptions","organizations_url":"https://api.github.com/users/hchandl/orgs","repos_url":"https://api.github.com/users/hchandl/repos","events_url":"https://api.github.com/users/hchandl/events{/privacy}","received_events_url":"https://api.github.com/users/hchandl/received_events","type":"User","site_admin":false},"repo":{"id":26611732,"name":"sql-layer-adapter-dbapi","full_name":"hchandl/sql-layer-adapter-dbapi","owner":{"login":"hchandl","id":3086362,"avatar_url":"https://avatars.githubusercontent.com/u/3086362?v=3","gravatar_id":"","url":"https://api.github.com/users/hchandl","html_url":"https://github.com/hchandl","followers_url":"https://api.github.com/users/hchandl/followers","following_url":"https://api.github.com/users/hchandl/following{/other_user}","gists_url":"https://api.github.com/users/hchandl/gists{/gist_id}","starred_url":"https://api.github.com/users/hchandl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hchandl/subscriptions","organizations_url":"https://api.github.com/users/hchandl/orgs","repos_url":"https://api.github.com/users/hchandl/repos","events_url":"https://api.github.com/users/hchandl/events{/privacy}","received_events_url":"https://api.github.com/users/hchandl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hchandl/sql-layer-adapter-dbapi","description":"Python DBAPI compatibility layer for the FoundationDB SQL Layer","fork":true,"url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi","forks_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/forks","keys_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/teams","hooks_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/hooks","issue_events_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/issues/events{/number}","events_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/events","assignees_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/assignees{/user}","branches_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/branches{/branch}","tags_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/tags","blobs_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/statuses/{sha}","languages_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/languages","stargazers_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/stargazers","contributors_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/contributors","subscribers_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/subscribers","subscription_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/subscription","commits_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/issues/comments/{number}","contents_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/contents/{+path}","compare_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/merges","archive_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/downloads","issues_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/issues{/number}","pulls_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/pulls{/number}","milestones_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/milestones{/number}","notifications_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/labels{/name}","releases_url":"https://api.github.com/repos/hchandl/sql-layer-adapter-dbapi/releases{/id}","created_at":"2014-11-13T22:49:46Z","updated_at":"2014-11-13T22:49:46Z","pushed_at":"2014-11-17T15:43:00Z","git_url":"git://github.com/hchandl/sql-layer-adapter-dbapi.git","ssh_url":"git@github.com:hchandl/sql-layer-adapter-dbapi.git","clone_url":"https://github.com/hchandl/sql-layer-adapter-dbapi.git","svn_url":"https://github.com/hchandl/sql-layer-adapter-dbapi","homepage":"","size":147,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"FoundationDB:master","ref":"master","sha":"68bc8147a0cffda5f7cba140ebbffeb79b1c8274","user":{"login":"FoundationDB","id":2393912,"avatar_url":"https://avatars.githubusercontent.com/u/2393912?v=3","gravatar_id":"","url":"https://api.github.com/users/FoundationDB","html_url":"https://github.com/FoundationDB","followers_url":"https://api.github.com/users/FoundationDB/followers","following_url":"https://api.github.com/users/FoundationDB/following{/other_user}","gists_url":"https://api.github.com/users/FoundationDB/gists{/gist_id}","starred_url":"https://api.github.com/users/FoundationDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoundationDB/subscriptions","organizations_url":"https://api.github.com/users/FoundationDB/orgs","repos_url":"https://api.github.com/users/FoundationDB/repos","events_url":"https://api.github.com/users/FoundationDB/events{/privacy}","received_events_url":"https://api.github.com/users/FoundationDB/received_events","type":"Organization","site_admin":false},"repo":{"id":15908934,"name":"sql-layer-adapter-dbapi","full_name":"FoundationDB/sql-layer-adapter-dbapi","owner":{"login":"FoundationDB","id":2393912,"avatar_url":"https://avatars.githubusercontent.com/u/2393912?v=3","gravatar_id":"","url":"https://api.github.com/users/FoundationDB","html_url":"https://github.com/FoundationDB","followers_url":"https://api.github.com/users/FoundationDB/followers","following_url":"https://api.github.com/users/FoundationDB/following{/other_user}","gists_url":"https://api.github.com/users/FoundationDB/gists{/gist_id}","starred_url":"https://api.github.com/users/FoundationDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoundationDB/subscriptions","organizations_url":"https://api.github.com/users/FoundationDB/orgs","repos_url":"https://api.github.com/users/FoundationDB/repos","events_url":"https://api.github.com/users/FoundationDB/events{/privacy}","received_events_url":"https://api.github.com/users/FoundationDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi","description":"Python DBAPI compatibility layer for the FoundationDB SQL Layer","fork":false,"url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi","forks_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/forks","keys_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/teams","hooks_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/hooks","issue_events_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/events{/number}","events_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/events","assignees_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/assignees{/user}","branches_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/branches{/branch}","tags_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/tags","blobs_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/statuses/{sha}","languages_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/languages","stargazers_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/stargazers","contributors_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/contributors","subscribers_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/subscribers","subscription_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/subscription","commits_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/comments/{number}","contents_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/contents/{+path}","compare_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/merges","archive_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/downloads","issues_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues{/number}","pulls_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls{/number}","milestones_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/milestones{/number}","notifications_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/labels{/name}","releases_url":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/releases{/id}","created_at":"2014-01-14T16:59:39Z","updated_at":"2014-09-10T14:27:43Z","pushed_at":"2014-10-13T20:38:50Z","git_url":"git://github.com/FoundationDB/sql-layer-adapter-dbapi.git","ssh_url":"git@github.com:FoundationDB/sql-layer-adapter-dbapi.git","clone_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi.git","svn_url":"https://github.com/FoundationDB/sql-layer-adapter-dbapi","homepage":"","size":380,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4"},"html":{"href":"https://github.com/FoundationDB/sql-layer-adapter-dbapi/pull/4"},"issue":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/4"},"comments":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/FoundationDB/sql-layer-adapter-dbapi/statuses/0e2b37b9b3ab410fcab15a5d9862c9fbc6fdf9e7"}}}}