Skip to content

SQL-S1 — SQLite Core Driver (SqliteConnection & SqliteService) #198

Description

@ZhuchkaTriplesix

Epic: #194
Source: docs/planned-0.4.5.md

Goal

Implement the core SQLite database connection driver wrapping sqflite_common_ffi and SqliteService to manage active connection handles to local database files.

Files

  • lib/core/database/drivers/sqlite/sqlite_connection.dart (new)
  • lib/core/database/drivers/sqlite/sqlite_service.dart (new)
  • test/core/database/drivers/sqlite/sqlite_connection_test.dart (new)

Implementation

  • Initialize sqfliteFfiInit() if running on desktop (Linux/Windows/macOS) in SqliteService.
  • Implement SqliteConnection class which inherits from the base Connection interface.
  • Implement SqliteService to open/close connection handles, execute queries, and handle read-only mode safety constraint.
  • Map SQLite result rows to the standard Querya database result structure.

Acceptance Criteria

  • SqliteConnection initializes successfully for local files.
  • Queries can be executed, and results are returned correctly mapped.
  • Connections are safely closed to prevent file handle/descriptor leaks.
  • Code is clean and passes flutter analyze.

Metadata

Metadata

Labels

coreCore library logic and servicessqliteSQLite database driver and workspace

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions