{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/95","repository_url":"https://api.github.com/repos/JuliaDB/SQLite.jl","labels_url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/95/comments","events_url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/95/events","html_url":"https://github.com/JuliaDB/SQLite.jl/issues/95","id":124915966,"number":95,"title":"Better printing of returned querysets","user":{"login":"hayd","id":1931852,"avatar_url":"https://avatars.githubusercontent.com/u/1931852?v=3","gravatar_id":"","url":"https://api.github.com/users/hayd","html_url":"https://github.com/hayd","followers_url":"https://api.github.com/users/hayd/followers","following_url":"https://api.github.com/users/hayd/following{/other_user}","gists_url":"https://api.github.com/users/hayd/gists{/gist_id}","starred_url":"https://api.github.com/users/hayd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayd/subscriptions","organizations_url":"https://api.github.com/users/hayd/orgs","repos_url":"https://api.github.com/users/hayd/repos","events_url":"https://api.github.com/users/hayd/events{/privacy}","received_events_url":"https://api.github.com/users/hayd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-01-05T08:03:22Z","updated_at":"2016-08-18T14:30:16Z","closed_at":"2016-08-18T14:30:16Z","body":"Currently:\r\n```\r\njulia> db = SQLite.DB(); query(db, \"CREATE TABLE t (c1 int, c2 string)\"); query(db, \"INSERT INTO t (c1, c2) VALUES (1, 'TWO'), (3, 'FOUR');\"); query(db, \"SELECT * FROM t\")\r\nData.Table:\r\n2x2 Data.Schema:\r\n    c1,         c2\r\n Int64, UTF8String\r\nNullableArrays.NullableArray{T,1}[NullableArrays.NullableArray{Int64,1}[1,3],NullableArrays.NullableArray{UTF8String,1}[\"TWO\",\"FOUR\"]]\r\n```\r\n\r\nI was wondering if it would be better to print something similar to as follows:\r\n\r\n```\r\nData.Table:\r\n2x2 Data.Schema:\r\n    c1,         c2\r\n Int64, UTF8String\r\n1\tTWO\r\n3\t∅\r\n```\r\n\r\nThis could be achieved with something like:\r\n\r\n      function Base.show(io::IO, x::Vector{NullableVector})\r\n        isempty(x) && return\r\n\r\n         for i in 1:length(x[1])\r\n           i == 1 || println()\r\n           for col in x\r\n             print(col[i].isnull ? \"∅\" : col[i].value, \"\\t\")\r\n           end\r\n         end\r\n       end\r\n\r\nThought there's probably a better way to do this than tabs (I'm sure this is a well-trodden problem), but thought I'd post my thoughts.\r\n\r\nI realize that this came with [changes in Base](https://github.com/JuliaLang/julia/pull/14304#issuecomment-164822958) but it would be nice to improve this here (without necessarily extending Base.show)."},"comment":{"url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/comments/240740877","html_url":"https://github.com/JuliaDB/SQLite.jl/issues/95#issuecomment-240740877","issue_url":"https://api.github.com/repos/JuliaDB/SQLite.jl/issues/95","id":240740877,"user":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T14:30:16Z","updated_at":"2016-08-18T14:30:16Z","body":"We now hook return a DataFrame by default which comes with a much more mature \"show\" experience"}}
{"actor":{"display_login":"quinnj"}}