volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.73k stars 544 forks source link

SQLite Support #83

Closed jojomi closed 5 years ago

jojomi commented 7 years ago

If I am not mistaken in the README.md, there is no support for SQLite. Is there plans to add it or is there conceptual problems with it?

nullbio commented 7 years ago

If there is a lot of demand for this we can look into it further. From our initial assessments it does seem possible. I'll leave this thread open so we can gauge interest.

aarondl commented 7 years ago

@jojomi I wanted to add some more concrete wording around this issue. SQLite is not on the roadmap currently and we don't have a need for it so we won't be implementing it UNLESS there's a huge demand by the community surrounding sqlboiler (like there was for mysql). It 'should' be possible as it's very similar to mysql.

If anyone would like to pursue this path, the first step is always creating a driver in the file bdb/drivers/sqlite.go and ensuring that for similar schemas similar output is achieved. --debug can be used to create a schema dump and you can diff them to ensure two database drivers create the same data for the same schema.

Thanks for bringing this up :)

jojomi commented 7 years ago

Thank your for the great tool, I imagine it is a lot of effort, but it sounds like just the thing you would need to have to implement database access in a golang way without being overly repetitive and verbose.

Also thank you for describing what one would have to do to implement a new driver, this might be README.md material :)

robks commented 7 years ago

It's better to focus on the big two DBs, yes, but SQLite is good for keeping some data offline - like notes. Thanks for this marvelous work!

nullbio commented 7 years ago

@robks Yeah, we'll need to change the way we handle database drivers before we implement sqlite3 support because the driver requires some manual compilation and dependency steps on Windows, and we don't want SQLBoiler to break on all Windows users if they aren't even using sqlite3 to begin with. It is something we want to have eventually though.

aarondl commented 6 years ago

This work is complete in the v3 branch and sqlite support can be built on top of it. There is still some breaking changes coming though I think a large majority of them that would affect drivers in any large way are done.

aarondl commented 5 years ago

This is done for a while now.

bradleypeabody commented 5 years ago

For posterity and people like me who spent 10 minutes reading through all this and related issues looking for this link: https://github.com/volatiletech/sqlboiler-sqlite3