-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jq/datastreams2 #80
Jq/datastreams2 #80
Conversation
…d up the result-fetch typing as well
…DataStreams implementation
Alright, to summarize what's going on here:
I've updated the docs, so as I see it, this is ready to merge. I'd obviously appreciate feedback from anyone/everyone who sees this, but I'd like to get this merged tomorrow (Sunday Oct 25) as a more formal announcement of DataStreams gets ready to be published. |
Great work! julia> db = SQLite.DB("Chinook_Sqlite.sqlite")
SQLite.DB("Chinook_Sqlite.sqlite")
julia> SQLite.query(db, "SELECT * FROM Genre")
Data.Table:
25x2 Data.Schema:
GenreId, Name
Int64, UTF8String
Error showing value of type DataStreams.Data.Table{Array{ERROR: MethodError: `type2string` has no method matching type2string(
in show at /Users/felipenoris/.julia/v0.4/NullableArrays/src/show.jl:7
in show_type_parameter at show.jl:100
in show at show.jl:110
in show_type_parameter at show.jl:100
in show at show.jl:110
in print at strings/io.jl:8
in print at strings/io.jl:18
in print_response at REPL.jl:139
in print_response at REPL.jl:121
in anonymous at REPL.jl:624
in run_interface at ./LineEdit.jl:1610
in run_frontend at ./REPL.jl:863
in run_repl at ./REPL.jl:167
in _start at ./client.jl:453SYSTEM: show(lasterr) caused an error |
Oh, julia> db = SQLite.DB("Chinook_Sqlite.sqlite")
SQLite.DB("Chinook_Sqlite.sqlite")
julia> SQLite.query(db, "SELECT * FROM Genre")
Data.Table:
25x2 Data.Schema:
GenreId, Name
Int64, UTF8String
NullableArrays.NullableArray{T,1}[NullableArrays.NullableArray{Int64,1}[1,2,3,4,5,6,7,8,9,10 … 16,17,18,19,20,21,22,23,24,25],NullableArrays.NullableArray{UTF8String,1}["Rock","Jazz","Metal","Alternative & Punk","Rock And Roll","Blues","Latin","Reggae","Pop","Soundtrack" … "World","Hip Hop/Rap","Science Fiction","TV Shows","Sci Fi & Fantasy","Drama","Comedy","Alternative","Classical","Opera"]] |
Yeah, we need to actually get NullableArrays, Libz, and BufferedStreams to all get new tags in METADATA |
This looks like some very nice improvements! |
It's a good point to bring up Scott. I've mulled this issue a bit more than most, I presume, and I've concluded that there's no great answer right now in Julia; for a greater discussion on the subject, see JuliaLang/julia#11207. What I've settled on is that we kind of have to rely on finalizers, since we need to destroy the resources here eventually to avoid database corruption and memory leaks. The way the finalizers are setup here also ensures that things can be killed in any order and they'll all be shut down correctly (i.e. if a statement is finalized before a db, then that's obviously fine, but even if the db is finalized before the statement, we're now using So in short, I realize that this isn't a "perfect world" kind of solution, but it seems to be about the best we can do currently in Julia. The recommended best practice is to just create |
Yes, and I was one of the biggest commenters on JuliaLang/julia#11207, that issue was in fact why I brought this up here now. |
That's not a bad idea to have |
Ok, a much more cleaned up PR (i.e. no merge conflicts). Not sure what happened with the git history, but I suspect it got borked because I've been doing so much locally lately and not staying in sync with master very well.