paul-rouse / mysql-simple

A mid-level client library for the MySQL database, intended to be fast and easy to use.
Other
91 stars 35 forks source link

how to get queryresult column header? #46

Open clojurians-org opened 6 years ago

clojurians-org commented 6 years ago

i can't find the method to get ResultMeta data about columnHeader for queryResult? so what's the way to acquire it?

paul-rouse commented 6 years ago

I am not sure what you are trying to retrieve - there is nothing called ResultMeta. The metadata used internally by mysql-simple comes from the Field type of the lower-level mysql package.

clojurians-org commented 6 years ago

do this library offer JSON VALUE/MAP binding for Result? for hdbc, it exist such function to acquire it.

ghci> results <- fetchAllRowsAL stmt [[("id",SqlString "0"),("desc",SqlNull)],[("id",SqlString "0"),("desc",SqlString "zero")],[("id",SqlString "1"),("desc",SqlString "one")]]

paul-rouse commented 6 years ago

No, this is not the same as hdbc