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

Encode binary query parameters using prepared definition types #204

Open
fishcakez opened this issue Oct 19, 2017 · 1 comment
Open

Encode binary query parameters using prepared definition types #204

fishcakez opened this issue Oct 19, 2017 · 1 comment

Comments

@fishcakez
Copy link
Contributor

This will allow us to:

  • Encode integers using less data
  • Automatically encode binaries correctly per parameter (fixing Add tagged parameters to encode. #198)
  • Encode maps as JSON when appropriate (improving Add json column support mysql(5.7~) #201)
  • Raise ArgumentError on bad parameter types to improve error handle logic for users who wish to rescue SQL errors but not logic errors leading to bad inputs
  • Return an error from handle_prepare if parameter is type we can't encode

Note that this is an advanced task and requires a significant change. If someone wishes to undertake it I can try to offer some guidance.

@wojtekmach
Copy link
Contributor

Unfortunately this is not possible, MySQL doesn't return types of the params, see: https://bugs.mysql.com/bug.php?id=92627

cc @josevalim

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

No branches or pull requests

2 participants