Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround obscure RDS Data Api Bug #478

Merged
merged 3 commits into from
May 16, 2023
Merged

Conversation

thdxr
Copy link
Contributor

@thdxr thdxr commented May 10, 2023

So I know this isn't ideal because it's making changes in kysely core for a 3rd party adapter - however it is also the simplest fix

There's some bug in the RDS api that does not like in statements used with char fields - it's interpreting the in values as strings instead of chars and failing

Switching it to an orWhere statement fixes the problem

Wanted to throw this up here in case you were willing to accept this change - otherwise we'll have to copy the whole PostgresIntrospector into kysely-data-api to make this one change

@vercel
Copy link

vercel bot commented May 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 6:20am

Copy link
Member

@igalklebanov igalklebanov left a comment

Choose a reason for hiding this comment

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

Hey 👋

Thank you! ❤️

Please check comment.

src/dialect/postgres/postgres-introspector.ts Outdated Show resolved Hide resolved
@igalklebanov igalklebanov added postgres Related to PostgreSQL built-in dialect Related to a built-in dialect enhancement New feature or request custom dialect Related to a custom dialect labels May 10, 2023
thdxr and others added 2 commits May 16, 2023 09:15
So I know this isn't ideal because it's making changes in kysely core for a 3rd party adapter - however it is also the simplest fix

There's some bug in the RDS api that does not like `in` statements used with char fields - it's interpreting the in values as strings instead of chars and failing

Switching it to an orWhere statement fixes the problem

Wanted to throw this up here in case you were willing to accept this change - otherwise we'll have to copy the whole PostgresIntrospector into kysely-data-api to make this one change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
built-in dialect Related to a built-in dialect custom dialect Related to a custom dialect enhancement New feature or request postgres Related to PostgreSQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants