Skip to content

Commit 120ebeb

Browse files
committed
test: add comprehensive IN expression test suite for issues #63, #66, #67
Adds in_expression_comprehensive_test.exs to catch regressions in: 1. Issue #63: JSON encoding of list parameters in IN clauses - Simple list parameters should expand to individual placeholders - ~w() sigils should be handled via %Ecto.Query.Tagged{} detection 2. PR #66: Subqueries in IN expressions (Oban pattern) - WHERE id IN (SELECT ...) should generate proper SQL subquery - Before fix: incorrectly wrapped in JSON_EACH() causing malformed JSON error - After fix: generates inline subquery with correct aliases 3. PR #67: Tagged struct and type-wrapped expressions - Post-planning %Ecto.Query.Tagged{} nodes must be handled - Type-wrapped fragments should not fall through to catch-all '?' placeholder - Before fix: parameter count mismatch with Hrana/Turso - After fix: correct parameter count and proper type handling Tests include: - Basic list parameter expansion - Empty lists and single-element lists - ~w() sigil handling (Oban Lite pattern) - Multiple IN clauses combined - Subqueries with WHERE, SELECT, complex filters - Type-cast expressions - Integration tests combining multiple patterns All 15 tests pass with the fixes in place. Relates to: #63, PR #65, PR #66, PR #67
1 parent a6321c3 commit 120ebeb

3 files changed

Lines changed: 514 additions & 153 deletions

File tree

.claude/settings.local.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
"Bash(gh run view:*)",
5656
"Bash(gh pr checkout:*)",
5757
"mcp__acp__Bash",
58-
"mcp__acp__Edit"
58+
"mcp__acp__Edit",
59+
"Bash(for:*)",
60+
"Bash(do echo \"=== Run $i ===\")",
61+
"Bash(done)"
5962
],
6063
"deny": [],
6164
"ask": []

0 commit comments

Comments
 (0)