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

bugfix: fix bytes encoding in entity::find #1482

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

lostman
Copy link
Contributor

@lostman lostman commented Nov 29, 2023

Description

Fixes #1480.

The issue was an incorrect conversion of (various) bytes scalars to sqlparser::Value as SingleQuotedByteStringLiteral.

All bytes scalars are stored as lower-hex encoded strings. Thus, changing the conversion to sql::Value::SingleQuotedString(hex::encode(self)) fixes the issue.

Testing steps

The same testing steps as outlined in #1480.

This PR also adds a couple of test cases.

Changelog

  • Fix ToSQLValue encoding of bytes [u8] scalar types

@lostman lostman self-assigned this Nov 29, 2023
@lostman lostman marked this pull request as ready for review November 29, 2023 12:04
Copy link
Contributor

@ra0x3 ra0x3 left a comment

Choose a reason for hiding this comment

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

Thanks @lostman

@ra0x3 ra0x3 merged commit 7fe3c06 into develop Nov 29, 2023
19 checks passed
@ra0x3 ra0x3 deleted the maciej/1480-entity-find-panics branch November 29, 2023 14:41
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.

Enity::find panics
3 participants