-
Notifications
You must be signed in to change notification settings - Fork 0
fix(connection): improve connection management #219
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
Conversation
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
ref: sqlitecloud/docs#111 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm, the only important thing remained to do is to update examples
f7decc2
to
3861f64
Compare
3861f64
to
bbd7c23
Compare