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

Add a SQLite implementation of the jeff.Storage interface #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mtlynch
Copy link

@mtlynch mtlynch commented Dec 9, 2022

No description provided.

Copy link
Owner

@abraithwaite abraithwaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the contribution! I think this is a great addition to the library.

There's only a few things I think need to be updated. In addition to the inline comments, could you also add a test to this file? Perhaps also an example for the documentation?

https://github.com/abraithwaite/jeff/blob/master/sessions_test.go

Finally, do you think it's possible to use standard SQL as much as possible and make this work for any *sql.DB object passed in, or is that unrealistic?

Thanks so much! 🎉

sqlite/sqlite.go Show resolved Hide resolved
sqlite/sqlite.go Outdated Show resolved Hide resolved
sqlite/sqlite.go Show resolved Hide resolved
@mtlynch
Copy link
Author

mtlynch commented Dec 14, 2022

Thanks for the notes! I've been sick this week, so I'm a little behind, but I'll hopefully have time to follow up this weekend or next.

@mtlynch
Copy link
Author

mtlynch commented Dec 18, 2022

In addition to the inline comments, could you also add a test to this file?

Sure, I added tests in 7d09c7a.

Perhaps also an example for the documentation?

I'm not seeing where this would go, as it doesn't look like the README has examples for any of the stores. Is there a place you have in mind?

Finally, do you think it's possible to use standard SQL as much as possible and make this work for any *sql.DB object passed in, or is that unrealistic?

I don't think this would be practical. MySQL/MSSQL/Postgres all have different semantics for prepared statements, so I don't think the syntax for SQLite would abstract away to the other DB types.

@mtlynch
Copy link
Author

mtlynch commented May 7, 2023

@abraithwaite - Is this PR still under consideration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants