{"action":"created","issue":{"url":"https://api.github.com/repos/onyxfish/agate-sql/issues/10","labels_url":"https://api.github.com/repos/onyxfish/agate-sql/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/onyxfish/agate-sql/issues/10/comments","events_url":"https://api.github.com/repos/onyxfish/agate-sql/issues/10/events","html_url":"https://github.com/onyxfish/agate-sql/pull/10","id":114705352,"number":10,"title":"Add Interval<-->TimeDelta support","user":{"login":"aklaver","id":658260,"avatar_url":"https://avatars.githubusercontent.com/u/658260?v=3","gravatar_id":"","url":"https://api.github.com/users/aklaver","html_url":"https://github.com/aklaver","followers_url":"https://api.github.com/users/aklaver/followers","following_url":"https://api.github.com/users/aklaver/following{/other_user}","gists_url":"https://api.github.com/users/aklaver/gists{/gist_id}","starred_url":"https://api.github.com/users/aklaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aklaver/subscriptions","organizations_url":"https://api.github.com/users/aklaver/orgs","repos_url":"https://api.github.com/users/aklaver/repos","events_url":"https://api.github.com/users/aklaver/events{/privacy}","received_events_url":"https://api.github.com/users/aklaver/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-02T23:09:26Z","updated_at":"2015-11-05T15:13:50Z","closed_at":"2015-11-05T14:46:38Z","pull_request":{"url":"https://api.github.com/repos/onyxfish/agate-sql/pulls/10","html_url":"https://github.com/onyxfish/agate-sql/pull/10","diff_url":"https://github.com/onyxfish/agate-sql/pull/10.diff","patch_url":"https://github.com/onyxfish/agate-sql/pull/10.patch"},"body":"Well this was fun. Interval(INTERVAL) is a many headed beast in SQLAlchemy. The patch adds code to deal with the fact that what interval type is used is dependent  on the database dialect. For those cases(postgresql, oracle) where there is native support use the native version and fake a python_type(datetime.timedelta) as that is not set in the native types. For the generic type it is set an so just use it, as it is datetime.timedelta also.  This deals with the from_sql case. For the to_sql case set the interval type using the dialect information from connection. To make all this happen create INTERVAL_MAP as lookup for dialect and interval type."},"comment":{"url":"https://api.github.com/repos/onyxfish/agate-sql/issues/comments/154088591","html_url":"https://github.com/onyxfish/agate-sql/pull/10#issuecomment-154088591","issue_url":"https://api.github.com/repos/onyxfish/agate-sql/issues/10","id":154088591,"user":{"login":"onyxfish","id":33046,"avatar_url":"https://avatars.githubusercontent.com/u/33046?v=3","gravatar_id":"","url":"https://api.github.com/users/onyxfish","html_url":"https://github.com/onyxfish","followers_url":"https://api.github.com/users/onyxfish/followers","following_url":"https://api.github.com/users/onyxfish/following{/other_user}","gists_url":"https://api.github.com/users/onyxfish/gists{/gist_id}","starred_url":"https://api.github.com/users/onyxfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onyxfish/subscriptions","organizations_url":"https://api.github.com/users/onyxfish/orgs","repos_url":"https://api.github.com/users/onyxfish/repos","events_url":"https://api.github.com/users/onyxfish/events{/privacy}","received_events_url":"https://api.github.com/users/onyxfish/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T15:13:50Z","updated_at":"2015-11-05T15:13:50Z","body":"Got this merged in. Am now putting in updates for agate 1.1.0 then I'll push a release. Thanks again, Adrian!"}}