-
-
Notifications
You must be signed in to change notification settings - Fork 4
Comparing changes
Open a pull request
base repository: ocean/ecto_libsql
base: 0.8.8
head repository: ocean/ecto_libsql
compare: 0.8.9
- 12 commits
- 9 files changed
- 3 contributors
Commits on Jan 27, 2026
-
test: add failing test case for ~w() sigil in IN clause (issue #63)
Amp-Thread-ID: https://ampcode.com/threads/T-019bfe38-44f9-74fc-b369-9b0ab4ee93e8 Co-authored-by: Amp <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8b94208 - Browse repository at this point
Copy the full SHA 8b94208View commit details -
fix: handle Ecto.Query.Tagged structs in IN clauses (e.g. ~w() sigil …
…from oban) - Add catch-all expr clause for IN with non-list right side - Extract list values from Ecto.Query.Tagged structs before generating IN clause - Fall back to JSON_EACH for pre-encoded JSON arrays - Fixes issue #63: Oban job state queries using ~w() sigil now work correctly Amp-Thread-ID: https://ampcode.com/threads/T-019bfe38-44f9-74fc-b369-9b0ab4ee93e8 Co-authored-by: Amp <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a3e977 - Browse repository at this point
Copy the full SHA 3a3e977View commit details -
docs: add unreleased changelog entry for issue #63 fix
Amp-Thread-ID: https://ampcode.com/threads/T-019bfe38-44f9-74fc-b369-9b0ab4ee93e8 Co-authored-by: Amp <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7d43878 - Browse repository at this point
Copy the full SHA 7d43878View commit details -
Merge pull request #65 from ocean/list-datatype-fixes
Datatype fixes for lists in IN clauses
Configuration menu - View commit details
-
Copy full SHA for 3946843 - Browse repository at this point
Copy the full SHA 3946843View commit details -
fix: handle Ecto.SubQuery in IN expressions
The catch-all IN clause handler was wrapping SubQuery expressions in JSON_EACH(), producing invalid SQL like: WHERE id IN (SELECT value FROM JSON_EACH(?)) This adds a specific pattern match for %Ecto.SubQuery{} before the catch-all, generating proper inline subqueries: WHERE id IN (SELECT s0.id FROM table AS s0 WHERE ...) Also adds a general SubQuery expression handler that properly resolves parent query aliases and combination queries. This fixes compatibility with libraries like Oban that use subqueries in UPDATE...WHERE id IN (subquery) patterns.Configuration menu - View commit details
-
Copy full SHA for 5a08eaf - Browse repository at this point
Copy the full SHA 5a08eafView commit details -
fix: handle Ecto.Query.Tagged in expr for type-cast fragments
Ecto's query planner transforms {:type, _, [expr, type]} AST nodes into %Ecto.Query.Tagged{} structs. The SQL generator only handled the pre-planning tuple form, causing type-wrapped fragments (e.g. type(fragment(...), :integer)) to fall through to the catch-all expr clause which rendered a single '?' placeholder. This caused parameter count mismatches with Hrana/Turso. Fixes Oban Web JobQuery.limit_query crash on completed jobs page.Configuration menu - View commit details
-
Copy full SHA for 9ef48fa - Browse repository at this point
Copy the full SHA 9ef48faView commit details
Commits on Jan 28, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 16218bc - Browse repository at this point
Copy the full SHA 16218bcView commit details -
Merge pull request #66 from nadilas/fix/subquery-in-expression
fix: handle Ecto.SubQuery in IN expressions
Configuration menu - View commit details
-
Copy full SHA for 53402e2 - Browse repository at this point
Copy the full SHA 53402e2View commit details -
Merge pull request #67 from nadilas/fix/tagged-struct-expr-handling
Fix/tagged struct expr handling
Configuration menu - View commit details
-
Copy full SHA for d2f693c - Browse repository at this point
Copy the full SHA d2f693cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6321c3 - Browse repository at this point
Copy the full SHA a6321c3View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 120ebeb - Browse repository at this point
Copy the full SHA 120ebebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 16c8ecd - Browse repository at this point
Copy the full SHA 16c8ecdView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 0.8.8...0.8.9