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

Raise error for Trilogy when prepared_statements is true #51072

Conversation

eileencodes
Copy link
Member

Trilogy doesn't currently support prepared statements. The error that applications would see is a StatementInvalid error. This doesn't quite point you to the fact this isn't supported. So raise a more appropriate error pointing to what to change.

Trilogy doesn't currently support prepared statements. The error that
applications would see is a `StatementInvalid` error. This doesn't quite point
you to the fact this isn't supported. So raise a more appropriate error
pointing to what to change.
@eileencodes eileencodes force-pushed the raise-error-for-trilogy-and-prepared-statements branch from 48e28ae to 847953d Compare February 13, 2024 19:47
@eileencodes eileencodes merged commit 8e20f5d into rails:main Feb 13, 2024
4 checks passed
@eileencodes
Copy link
Member Author

I'm backporting this because the error message doesn't make it clear that the problem is prepared statements are not supported by Trilogy.

@eileencodes eileencodes deleted the raise-error-for-trilogy-and-prepared-statements branch February 13, 2024 20:09
eileencodes added a commit that referenced this pull request Feb 13, 2024
Trilogy doesn't currently support prepared statements. The error that
applications would see is a `StatementInvalid` error. This doesn't quite point
you to the fact this isn't supported. So raise a more appropriate error
pointing to what to change.

Manual backport of #51072 due to conflicts.
@mkdynamic
Copy link
Contributor

@eileencodes Do you know if this is still accurate?

The Trilogy README explicitly says:

Support prepared statements (binary protocol)
https://github.com/trilogy-libraries/trilogy

@mkdynamic
Copy link
Contributor

@eileencodes Ah, sorry, I realize that is for the C library not the Ruby adapter.
trilogy-libraries/trilogy#105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants