-
Notifications
You must be signed in to change notification settings - Fork 39
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
API or example of frictionless usage #96
Comments
From the docs
So for |
Thanks - sorry, as I expected, I was missing something :) Cheers! |
Also, I would hope that a NamedTuple of Vectors wouldn't be too scary for you. It's actually one of the simplest possible things you could return for a query result. I.e. a NamedTuple is just a struct with fields, and in the case of a query result, each column in the resultset is a field. So in you're case, you could access each column of your resultset like |
I was adding support for the new MySQL.jl API into Searchlight.jl - an ORM that provides a unifying API for MySQL.jl, SQLite.jl and Postgres.jl, allowing to swap DB backends in Genie. I'm also planning on adding support for ODBC soon, to cover cases where native Julia support is lacking. The problem was that each library had its own API, which made a unifying approach very difficult. The only common thing was the Now it seems that the DB access libraries that are actively developed and maintained (MySQL.jl, SQLite.jl and in some measure ODBC.jl) are moving towards a common API that wraps DataStreams.jl. I'd certainly appreciate a common API as it would make things simple in the ORM layer -- and would allow me to look at potentially more performant data structures, like the |
Sorry to be a pain but I'm not sure how to handle the new API. I'm probably missing something but it seems to me that the results of both
query(...)
andQuery(...)
are pretty much unusable directly. When I'm at the REPL and run a query I expect something that I can understand and further work with.Now
MySQL.query(conn, "SHOW COLUMNS FROM
tweets")
returns something unusable for a normal human being:Which is the representation of a
NamedTuples._NT_Field_Type_Null_Key_Default_Extra{Array{String,1},Array{Array{UInt8,1},1},Array{String,1},Array{String,1},Array{Union{Array{UInt8,1}, Missings.Missing},1},Array{String,1}}
-- oh my!MySQL.Query(...)
results in something similar...Despite googling, I couldn't find any good example of converting one of these into a DataFrame in a straightforward way (without having to manually create a DataFrame and then manually iterate over the result).
(in a tiny voice: Help? 😨 )
The text was updated successfully, but these errors were encountered: