Skip to content

Conversation

@jsdt
Copy link
Contributor

@jsdt jsdt commented Nov 6, 2025

Description of Changes

This updates a bunch of types to make sure we generate the right functions for indexes with multiple columns. Most of the changes are making the array of column names readonly.

This also has a fix for AllUnique, because we were treating composite indexes as unique when the first field had a unique index. FWIW, we should also make sure that the range scanning functions still exist in that case, but I didn't try to add that here.

API and ABI breaking changes

Any change to these types is probably technically a breaking API change, but no one should consider these types stable.

Expected complexity level and risk

1.5. I'm still not super confident with some of these types, but this shouldn't change any runtime behavior.

Testing

I added some uses of indexes in schema.test-d.ts, so pnpm run build:types would throw errors if this were broken.

Copy link
Collaborator

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping to avoid recursion, but if it doesn't work otherwise, this LGTM

@jsdt jsdt requested a review from cloutiertyler November 6, 2025 19:14
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense and looks good to me

@jsdt jsdt enabled auto-merge November 6, 2025 22:21
@jsdt jsdt added this pull request to the merge queue Nov 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2025
@jsdt jsdt added this pull request to the merge queue Nov 6, 2025
Merged via the queue into master with commit 400252f Nov 7, 2025
24 of 25 checks passed
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.

4 participants