Problem
data_diff/databases/base.py (1,315 lines) bundles four distinct responsibilities:
- Compiler — SQL AST compilation
- BaseDialect — SQL dialect abstraction
- Database — Connection management (cloud/async)
- ThreadedDatabase — Connection pooling (cursor-based)
Every driver author must understand the entire file. This is a barrier to contribution.
Proposed Decomposition
data_diff/databases/
compiler.py # Compiler class
dialect.py # BaseDialect ABC
database.py # Database + ThreadedDatabase ABCs
base.py # Re-exports for backward compatibility (temporary)
Constraints
- All existing imports must continue working
- No behavioral changes
- Driver files should not need modification
Acceptance Criteria
Problem
data_diff/databases/base.py(1,315 lines) bundles four distinct responsibilities:Every driver author must understand the entire file. This is a barrier to contribution.
Proposed Decomposition
Constraints
Acceptance Criteria