FFFF
Skip to content

fix(sql): convert custom type values in kysely where clauses - #8189

Merged
B4nan merged 2 commits into
masterfrom
claude/kysely-custom-types-where-a5cc7e
Aug 20, 2026
Merged

fix(sql): convert custom type values in kysely where clauses#8189
B4nan merged 2 commits into
masterfrom
claude/kysely-custom-types-where-a5cc7e

Conversation

@B4nan
@B4nan B4nan commented Aug 20, 2026
Copy link
Copy Markdown
Member

With convertValues: true, the kysely plugin converted custom type values in insertInto().values() and updateTable().set(), but not in where clauses. Passing a custom type's runtime value (e.g. a value object) to .where() failed when the driver tried to bind it, even though the types allow it.

The transformer now converts comparison operands too: it resolves the entity property from the left operand (a plain or table-qualified column) and runs the right operand through the same conversion as insert/update values, including convertToDatabaseValueSQL wrapping and in lists.

Reproduction: https://github.com/mificot/kysely-cutom-types-where-clause

@codecov
codecov Bot commented Aug 20, 2026
Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 99.65%. Comparing base (9560a94) to head (b7be116).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #8189    +/-   ##
========================================
  Coverage   99.65%   99.65%            
========================================
  Files         287      287            
  Lines       30343    30386    +43     
  Branches     8026     8396   +370     
========================================
+ Hits        30239    30282    +43     
  Misses        100      100            
  Partials        4        4            

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@B4nan
B4nan merged commit f81cef2 into master Aug 20, 2026
47 of 48 checks passed
@B4nan
B4nan deleted the claude/kysely-custom-types-where-a5cc7e branch August 20, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0