-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add some example code? #5
Comments
Hello, |
Ahhh, I wasn't able to get things working with mattn's driver, but I did manage to make it work with yours. |
You've moved focus from Go to Rust? |
Ok, I see that you are using the low-level API (not the standard database/sql API). And do the same for Postgresql with pgx!
And yes, for me, Rust is more rewarding than Go. |
Yeah, in this particular application (similar to a web based database viewer) the database(s) are user supplied. Example screenshot to give the idea: When I first tried the standard Scan method - using mattn's driver through database/sql - I just kept getting conversion errors, even using *interface{}. There didn't seem to be a way to determine the correct concrete type to use for the cells in a result set. Looking at the mattn's driver docs on godoc.org, there's a DeclTypes() function which seems like it should serve that purpose, which I didn't try last time. |
Looking at With I guess for now I'll need to keep using your driver, and/or look at switching if something turns out to break further on which I can't fix. 😄 If I'm getting this wrong somehow, I'm definitely open to doing things differently. Still very early in my Golang learning. |
I suggest that:
I once tried to describe the problem related to SQLite dynamic type and propose a solution here. |
@gwenn Thanks. Yeah, getting this fixed in mattn's driver is on our list. Just not right now though. 😉 |
Going to try out the SQLite3 driver in this repo, as mattn's one doesn't seem to cope with SQLite's dynamic type system.
But... no example code for beginners to look at.☹️
The reference info on godoc.org seems useful, but targeted to a more experienced audience.
Any chance of adding example code to this repo? Hopefully something that shows off the things useful here which aren't present in the commonly used driver (mattn's). 😄
The text was updated successfully, but these errors were encountered: