Skip to content
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

Support SQLite #161

Open
rasviitanen opened this issue Sep 18, 2021 · 3 comments · May be fixed by #185
Open

Support SQLite #161

rasviitanen opened this issue Sep 18, 2021 · 3 comments · May be fixed by #185
Assignees
Labels
integration A change which affects or introduces an integration

Comments

@rasviitanen
Copy link

rasviitanen commented Sep 18, 2021

Required Functionality
I use sqlite in some projects and would like to be able to use synth in these projects as well.

Something like this is what I am looking for:

synth import gen --from sqlite://real.db3
synth generate gen --to sqlite://generated.db3

Proposed Solution
I think this can be done by leveraging the already existing sqlite support in sqlx.
I did a very rough implementation here: rasviitanen@938976b to show that it requires a minimal effort.

Obviously the implementation needs cleaning up (I copied the MySql implementation and tweaked it until import/generate worked for the db I have). But it shows a rough idea about how this could be implemented.

If you are interested I would be happy to spend some more time on this and make a more refined implementation. But I understand if you dont want to add extra complexity by introducing another db at this stage.

Use case
I have a bunch of very complex sqlite-files with real user data. I want to be able to generate files similar to these by using synth.

@christos-h
Copy link
Member

Hey @rasviitanen ! I looked at the linked commit and it looks great!

SQLite support is very much on the roadmap, so it's great that you're working on an implementation - if you are interested in seeing it all the way through I'd be more than happy to merge it. If you need any help please do let me know.

I'll assign you on this one. Really excited to get this merged in!

@christos-h christos-h added the integration A change which affects or introduces an integration label Sep 19, 2021
@christos-h
Copy link
Member

Hey @rasviitanen - would you like me to finish your sqlite work and push it over the line?

@rasviitanen
Copy link
Author

@christoshadjiaslanis Hey, thanks for asking. I have been incredibly busy since I posted this, but I have started to look at this again and will try to wrap it up during the weekend. Hopefully the next update is a PR, otherwise I'll let you know what the status is.

@rasviitanen rasviitanen linked a pull request Oct 3, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration A change which affects or introduces an integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants