Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve SQLite performance (#1024)
* refactor: Improve SQLite performance with connection pooling and retry logic * feat: Add withTx and withTxRetry methods to SQLiteDatabase for handling database locks * refactor: add Init command to all databases * refactor: Improve transaction handling with retry and error management * refactor: Remove panic/recover pattern in transaction handling * refactor: Replace `errors.WithStack` with `fmt.Errorf` in transaction methods * docs: Add docstrings to `withTx` and `withTxRetry` methods in SQLite database implementation * feat: use new withTxRetry in SaveBookmarks * feat: sqlite inmmediate transactions by default * refactor: Split SQLiteDatabase into separate writer and reader dbbase instances * refactor: Update Init method to configure both reader and writer database connections * feat: use writer/reader sqlite databases * refactor: Replace all read calls to use the `reader` database instance * refactor: Replace errors.WithStack with fmt.Errorf and add nil checks refactor: Replace errors.WithStack with fmt.Errorf and add proper error handling fix: Handle potential database connection errors with improved error wrapping refactor: Replace errors.WithStack with fmt.Errorf and improve error handling refactor: Replace error handling with fmt.Errorf and proper nil checks refactor: Replace errors.WithStack with fmt.Errorf and add nil error checks refactor: Replace errors.WithStack with fmt.Errorf and add nil checks in sqlite.go refactor: Replace errors.WithStack with fmt.Errorf and add nil checks refactor: Replace errors.WithStack with fmt.Errorf and improve error handling refactor: Replace remaining errors.WithStack with fmt.Errorf in sqlite.go * refactor: Use withTxRetry for SetDatabaseSchemaVersion method * fix: Simplify error handling in GetBookmark and GetAccount methods * refactor: Remove duplicated non-nil error checks in sqlite.go fix: duplicated non-nil checks * tests: use testutil instead of a manual in memory sqlite db * fix: openbsd sqlite connection
- Loading branch information