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

reuse sqlite connection in golang sdk #1827

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

rajatjindal
Copy link
Collaborator

I was trying something using golang sdk with sqlite, and kept running into "Database full" error. Turns out that error is thrown by our host component when we open too many connections to the sqlite. (separate PR incoming for that).

It seems like in our golang sdk's Connect method, (which is apparently called whenever we call Execute/Query etc method), we were always opening the new connection.

per the documentation of Connect method, it can return a cached connection. This PR adds ability to cache and reuse the existing connection. I tested this with same app, and it works now.

@rajatjindal rajatjindal requested review from adamreese and rylev October 1, 2023 08:40
@rajatjindal rajatjindal merged commit 717e589 into fermyon:main Oct 2, 2023
9 checks passed
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