Browse Source
This commit significantly improves the dbQuery function in ElectronPlatformService with proper connection lifecycle management and error handling. Key changes: - Add SQLite availability check before operations - Implement proper connection lifecycle: - Create connection - Open database - Verify database state - Execute query - Ensure cleanup - Enhance error handling: - Check SQLite availability - Verify IPC renderer - Handle database state - Proper cleanup in finally block - Improve logging: - Add [dbQuery] tag for better tracing - Log all connection lifecycle events - Enhanced error logging - Add type safety: - SQLiteQueryResult interface - Proper type casting - Maintain generic type support Technical details: - Add SQLiteQueryResult interface for type safety - Implement proper connection state verification - Add comprehensive error messages - Ensure proper resource cleanup - Follow same pattern as main.electron.ts Testing: - All database operations properly logged - Connection lifecycle verified - Error conditions handled - Resources properly cleaned up Author: Matthew Raymersql-absurd-sql-further
2 changed files with 89 additions and 15 deletions
Loading…
Reference in new issue