JuliaDatabases / DBAPI.jl

A new database interface proposal
Other
12 stars 12 forks source link

maybe accept queries with a list/tuple/vector of Julia types (conversion targets) #5

Open J-Sarnoff opened 8 years ago

J-Sarnoff commented 8 years ago

It would be a nice low-level assist from the DBAPI to SELECT fields from the DB and, before returning the result, convert(TargetType, field)ing the field values to the types the queryor will use.

iamed2 commented 8 years ago

Yes, I have been thinking about a version of fetchinto_ that takes a container type and constructs and returns that container. I think that would satisfy this?

Thanks for contributing :) feel free to open any other feature request or idea issues, as I want to take many perspectives into account with this package.

J-Sarnoff commented 8 years ago

If by container you mean https://github.com/pluskid/SimpleStructs.jl -- yes if also you can replicate that for multirow responses.

Python DBI2 is not all that compelling -- it is a least likely to offend, erstwhile attempt at genericity. Times have changed some. I have no qualm with using it to make sure 'bases are covered'.

What is your opinion of SQLAlchemy (not that that should be the DBI -- that the DBI should allow such constructions (the Julia way) to become available with more ease and less expertise.

J-Sarnoff commented 8 years ago

unclosed

iamed2 commented 8 years ago

Moved the design discussion which is out of the scope of this issue to #6