Files
bun.sh/test/js/sql
Claude Bot 3e4777de85 feat: Add comprehensive adapter-protocol validation with conflict detection
Added comprehensive tests and validation for adapter-protocol compatibility:

**New Test Coverage:**
-  Explicit adapter with URL without protocol (should work)
-  Explicit adapter with matching protocol (should work)
-  Adapter conflicts with protocol (should throw error)
-  Unix socket protocol with explicit adapter (should work)
-  SQLite protocol with sqlite adapter (should work)

**Error Cases Added:**
- `mysql` adapter + `postgres://` → throws "Protocol 'postgres' is not compatible with adapter 'mysql'"
- `postgres` adapter + `mysql://` → throws "Protocol 'mysql' is not compatible with adapter 'postgres'"
- `sqlite` adapter + `mysql://` → throws "Protocol 'mysql' is not compatible with adapter 'sqlite'"
- `mysql` adapter + `postgres://` → throws "Protocol 'postgres' is not compatible with adapter 'mysql'"

**Implementation Fix:**
- Moved adapter-protocol validation earlier in parsing process (Step 2.5)
- Now validates all adapters including SQLite before early return
- Prevents SQLite adapter bypass of validation logic
- Special handling for SQLite URL parsing in validation

**Test Results:**
- 8 new adapter-protocol validation tests - all pass
- 31 total adapter precedence tests - all pass
- 218 SQLite tests - all pass (no regressions)

This ensures users get clear error messages when mixing incompatible
adapters and protocols, improving the developer experience.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 12:07:23 -07:00
..
2025-08-19 23:15:53 -07:00
2025-05-08 18:51:32 -07:00
2025-05-08 18:51:32 -07:00
2025-08-01 22:41:05 -07:00
2025-08-19 23:15:53 -07:00