You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(architecture): elevate SqlExecutionDelegate to core/database and unify SQL connection contracts #1504
Currently, the contract for executing SQL queries, transactions, and mutations (SqlExecutionDelegate) is located in lib/features/workspace/sql_execution_delegate.dart instead of lib/core/database/.
Because architectural guard tests (test/guards/core_does_not_import_features_test.dart) prohibit core/ from importing features/:
The codebase must maintain duplicate adapter classes in feature folders (e.g. PostgresSqlExecutionDelegate, MySqlExecutionDelegate, SqliteSqlExecutionDelegate) that merely proxy calls between the workspace and the core connections.
There is no unified SqlConnection or DatabaseConnection abstraction in core/database/.
Scope
Elevate or merge SqlExecutionDelegate into lib/core/database/ (alongside or unifying with SqlQueryRunner).
Define a unified SqlConnection contract in core/database/ that standardizes execution, transaction lifecycle (begin, commit, rollback), and table schema resolution.
Refactor GenericSqlWorkspace to consume the core execution contract directly, eliminating boilerplate adapter classes across features/postgresql/, features/mysql/, and features/sqlite/.
Acceptance
No database execution delegate contracts defined inside features/.
Core connection classes implement a unified execution contract directly.
Architectural guard core_does_not_import_features_test.dart passes without exceptions.
Activity