fix(connection): improve connection management#219
Merged
danielebriggi merged 6 commits intomainfrom Feb 27, 2025
Merged
Conversation
Member
danielebriggi
commented
Feb 25, 2025
- resolve the creation of two connections. The dynamic import of the connection modules delayed the initialization of the SQLiteCloudConnection object. Between the initialization of the Database object and the call to sql() method, the connection was not yet initialized
- connection to the database and the commands are put in queue to ensure the connection to be ready (the socket connection is a background operation)
- remove the implicit connection to the database in the sql() methods. We want the user be aware of the status of the connection (eg, due to open transactions)
- enable TCP keep alive to be notified of the most of the cases of errors on the TCP socket
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
==========================================
- Coverage 87.28% 86.33% -0.96%
==========================================
Files 11 11
Lines 975 973 -2
Branches 287 288 +1
==========================================
- Hits 851 840 -11
- Misses 124 133 +9 ☔ View full report in Codecov by Sentry. |
d92c380 to
ca3a0fb
Compare
ca3a0fb to
f83e812
Compare
- resolve the creation of two connections. The dynamic import of the connection modules delayed the initialization of the SQLiteCloudConnection object. Between the initialization of the Database object and the call to sql() method, the connection was not yet initialized - connection to the database and the commands are put in queue to ensure the connection to be ready (the socket connection is a background operation) - remove the implicit connection to the database in the sql() methods. We want the user be aware of the status of the connection (eg, due to open transactions) - enable TCP keep alive to be notified of the most of the cases of errors on the TCP socket
f83e812 to
94723d3
Compare
Member
Author
|
ref: sqlitecloud/docs#111 |
Gioee
approved these changes
Feb 26, 2025
Member
Gioee
left a comment
There was a problem hiding this comment.
generally lgtm, the only important thing remained to do is to update examples
Gioee
approved these changes
Feb 26, 2025
f7decc2 to
3861f64
Compare
3861f64 to
bbd7c23
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.