{"action":"created","comment":{"url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/comments/32954242","id":32954242,"diff_hunk":"@@ -300,3 +300,15 @@ function exec(conn::TransactionConnection)\n     multi(conn)\n     response\n end\n+\n+###############################################################\n+# The following Redis commands can be typecast to Julia structs\n+###############################################################\n+\n+function time(c::RedisConnection)\n+    t = _time(c)\n+    s = parse(Int,t[1])\n+    ms = parse(Float64, t[2]) / 1e6\n+    return Base.Dates.unix2datetime(s+ms)","path":"src/commands.jl","position":null,"original_position":22,"commit_id":"91c95c7a49dbac1b48cae395434908e8d201f208","original_commit_id":"141c18b1d202180f692ed61604bac3fd4f970e36","user":{"login":"jkaye2012","id":4085244,"avatar_url":"https://avatars.githubusercontent.com/u/4085244?v=3","gravatar_id":"","url":"https://api.github.com/users/jkaye2012","html_url":"https://github.com/jkaye2012","followers_url":"https://api.github.com/users/jkaye2012/followers","following_url":"https://api.github.com/users/jkaye2012/following{/other_user}","gists_url":"https://api.github.com/users/jkaye2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jkaye2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkaye2012/subscriptions","organizations_url":"https://api.github.com/users/jkaye2012/orgs","repos_url":"https://api.github.com/users/jkaye2012/repos","events_url":"https://api.github.com/users/jkaye2012/events{/privacy}","received_events_url":"https://api.github.com/users/jkaye2012/received_events","type":"User","site_admin":false},"body":"This seems to be incompatible with v0.3\r\n\r\nERROR: Dates not defined\r\n in time at /Users/jkaye/.julia/v0.3/Redis/src/commands.jl:313","created_at":"2015-06-22T16:33:20Z","updated_at":"2015-06-22T16:33:20Z","html_url":"https://github.com/jkaye2012/Redis.jl/pull/10#discussion_r32954242","pull_request_url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/comments/32954242"},"html":{"href":"https://github.com/jkaye2012/Redis.jl/pull/10#discussion_r32954242"},"pull_request":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10","id":38232004,"html_url":"https://github.com/jkaye2012/Redis.jl/pull/10","diff_url":"https://github.com/jkaye2012/Redis.jl/pull/10.diff","patch_url":"https://github.com/jkaye2012/Redis.jl/pull/10.patch","issue_url":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/10","number":10,"state":"open","locked":false,"title":"added typecasting functionality for redis output","user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars.githubusercontent.com/u/941359?v=3","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"body":"This enables Julian typecasting for redis output, with an example in the Redis `time` function. To use, prepend one or more underscores (`_`) to a Redis function in `commands.jl` and create a custom function (named after the Redis command) that interprets the output and returns the proper datatype.","created_at":"2015-06-22T13:36:24Z","updated_at":"2015-06-22T16:33:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"835490d32b23202a8354a34cf7d71c1283964865","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10/commits","review_comments_url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10/comments","review_comment_url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/10/comments","statuses_url":"https://api.github.com/repos/jkaye2012/Redis.jl/statuses/91c95c7a49dbac1b48cae395434908e8d201f208","head":{"label":"sbromberger:customfns","ref":"customfns","sha":"91c95c7a49dbac1b48cae395434908e8d201f208","user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars.githubusercontent.com/u/941359?v=3","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"repo":{"id":37795054,"name":"Redis.jl","full_name":"sbromberger/Redis.jl","owner":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars.githubusercontent.com/u/941359?v=3","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbromberger/Redis.jl","description":"A fully-featured Redis client for the Julia programming language","fork":true,"url":"https://api.github.com/repos/sbromberger/Redis.jl","forks_url":"https://api.github.com/repos/sbromberger/Redis.jl/forks","keys_url":"https://api.github.com/repos/sbromberger/Redis.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbromberger/Redis.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbromberger/Redis.jl/teams","hooks_url":"https://api.github.com/repos/sbromberger/Redis.jl/hooks","issue_events_url":"https://api.github.com/repos/sbromberger/Redis.jl/issues/events{/number}","events_url":"https://api.github.com/repos/sbromberger/Redis.jl/events","assignees_url":"https://api.github.com/repos/sbromberger/Redis.jl/assignees{/user}","branches_url":"https://api.github.com/repos/sbromberger/Redis.jl/branches{/branch}","tags_url":"https://api.github.com/repos/sbromberger/Redis.jl/tags","blobs_url":"https://api.github.com/repos/sbromberger/Redis.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbromberger/Redis.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbromberger/Redis.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbromberger/Redis.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbromberger/Redis.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/sbromberger/Redis.jl/languages","stargazers_url":"https://api.github.com/repos/sbromberger/Redis.jl/stargazers","contributors_url":"https://api.github.com/repos/sbromberger/Redis.jl/contributors","subscribers_url":"https://api.github.com/repos/sbromberger/Redis.jl/subscribers","subscription_url":"https://api.github.com/repos/sbromberger/Redis.jl/subscription","commits_url":"https://api.github.com/repos/sbromberger/Redis.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbromberger/Redis.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbromberger/Redis.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbromberger/Redis.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbromberger/Redis.jl/contents/{+path}","compare_url":"https://api.github.com/repos/sbromberger/Redis.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbromberger/Redis.jl/merges","archive_url":"https://api.github.com/repos/sbromberger/Redis.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbromberger/Redis.jl/downloads","issues_url":"https://api.github.com/repos/sbromberger/Redis.jl/issues{/number}","pulls_url":"https://api.github.com/repos/sbromberger/Redis.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/sbromberger/Redis.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/sbromberger/Redis.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbromberger/Redis.jl/labels{/name}","releases_url":"https://api.github.com/repos/sbromberger/Redis.jl/releases{/id}","created_at":"2015-06-21T03:28:00Z","updated_at":"2015-06-21T03:28:00Z","pushed_at":"2015-06-22T16:32:45Z","git_url":"git://github.com/sbromberger/Redis.jl.git","ssh_url":"git@github.com:sbromberger/Redis.jl.git","clone_url":"https://github.com/sbromberger/Redis.jl.git","svn_url":"https://github.com/sbromberger/Redis.jl","homepage":null,"size":104,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jkaye2012:master","ref":"master","sha":"3e1dfb93b5dc174318aac308d46493a900fbc2c2","user":{"login":"jkaye2012","id":4085244,"avatar_url":"https://avatars.githubusercontent.com/u/4085244?v=3","gravatar_id":"","url":"https://api.github.com/users/jkaye2012","html_url":"https://github.com/jkaye2012","followers_url":"https://api.github.com/users/jkaye2012/followers","following_url":"https://api.github.com/users/jkaye2012/following{/other_user}","gists_url":"https://api.github.com/users/jkaye2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jkaye2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkaye2012/subscriptions","organizations_url":"https://api.github.com/users/jkaye2012/orgs","repos_url":"https://api.github.com/users/jkaye2012/repos","events_url":"https://api.github.com/users/jkaye2012/events{/privacy}","received_events_url":"https://api.github.com/users/jkaye2012/received_events","type":"User","site_admin":false},"repo":{"id":27340981,"name":"Redis.jl","full_name":"jkaye2012/Redis.jl","owner":{"login":"jkaye2012","id":4085244,"avatar_url":"https://avatars.githubusercontent.com/u/4085244?v=3","gravatar_id":"","url":"https://api.github.com/users/jkaye2012","html_url":"https://github.com/jkaye2012","followers_url":"https://api.github.com/users/jkaye2012/followers","following_url":"https://api.github.com/users/jkaye2012/following{/other_user}","gists_url":"https://api.github.com/users/jkaye2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jkaye2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkaye2012/subscriptions","organizations_url":"https://api.github.com/users/jkaye2012/orgs","repos_url":"https://api.github.com/users/jkaye2012/repos","events_url":"https://api.github.com/users/jkaye2012/events{/privacy}","received_events_url":"https://api.github.com/users/jkaye2012/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkaye2012/Redis.jl","description":"A fully-featured Redis client for the Julia programming language","fork":false,"url":"https://api.github.com/repos/jkaye2012/Redis.jl","forks_url":"https://api.github.com/repos/jkaye2012/Redis.jl/forks","keys_url":"https://api.github.com/repos/jkaye2012/Redis.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkaye2012/Redis.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkaye2012/Redis.jl/teams","hooks_url":"https://api.github.com/repos/jkaye2012/Redis.jl/hooks","issue_events_url":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/events{/number}","events_url":"https://api.github.com/repos/jkaye2012/Redis.jl/events","assignees_url":"https://api.github.com/repos/jkaye2012/Redis.jl/assignees{/user}","branches_url":"https://api.github.com/repos/jkaye2012/Redis.jl/branches{/branch}","tags_url":"https://api.github.com/repos/jkaye2012/Redis.jl/tags","blobs_url":"https://api.github.com/repos/jkaye2012/Redis.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkaye2012/Redis.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkaye2012/Redis.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkaye2012/Redis.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkaye2012/Redis.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/jkaye2012/Redis.jl/languages","stargazers_url":"https://api.github.com/repos/jkaye2012/Redis.jl/stargazers","contributors_url":"https://api.github.com/repos/jkaye2012/Redis.jl/contributors","subscribers_url":"https://api.github.com/repos/jkaye2012/Redis.jl/subscribers","subscription_url":"https://api.github.com/repos/jkaye2012/Redis.jl/subscription","commits_url":"https://api.github.com/repos/jkaye2012/Redis.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkaye2012/Redis.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkaye2012/Redis.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkaye2012/Redis.jl/contents/{+path}","compare_url":"https://api.github.com/repos/jkaye2012/Redis.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkaye2012/Redis.jl/merges","archive_url":"https://api.github.com/repos/jkaye2012/Redis.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkaye2012/Redis.jl/downloads","issues_url":"https://api.github.com/repos/jkaye2012/Redis.jl/issues{/number}","pulls_url":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/jkaye2012/Redis.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/jkaye2012/Redis.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkaye2012/Redis.jl/labels{/name}","releases_url":"https://api.github.com/repos/jkaye2012/Redis.jl/releases{/id}","created_at":"2014-11-30T15:53:09Z","updated_at":"2015-06-21T03:42:38Z","pushed_at":"2015-06-22T16:29:49Z","git_url":"git://github.com/jkaye2012/Redis.jl.git","ssh_url":"git@github.com:jkaye2012/Redis.jl.git","clone_url":"https://github.com/jkaye2012/Redis.jl.git","svn_url":"https://github.com/jkaye2012/Redis.jl","homepage":null,"size":226,"stargazers_count":14,"watchers_count":14,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10"},"html":{"href":"https://github.com/jkaye2012/Redis.jl/pull/10"},"issue":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/10"},"comments":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/jkaye2012/Redis.jl/statuses/91c95c7a49dbac1b48cae395434908e8d201f208"}}}}