fix(mysql): correct binary/varbinary types to Buffer + tests#5434
Open
Iceshen87 wants to merge 2 commits intodrizzle-team:mainfrom
Open
fix(mysql): correct binary/varbinary types to Buffer + tests#5434Iceshen87 wants to merge 2 commits intodrizzle-team:mainfrom
Iceshen87 wants to merge 2 commits intodrizzle-team:mainfrom
Conversation
Author
|
✅ PR created with comprehensive fixes and test coverage. Summary:
Files Changed:
Ready for review! 🚀 /claim |
… null - Fix bug where entire nested object becomes null if first field is null - Track individual field nullability instead of object-level - Only nullify nested object if ALL fields are null AND join is nullable - Add comprehensive test coverage for edge cases Fixes: drizzle-team#1603
Author
|
Hi! Thanks for reviewing this PR. I noticed it doesn't have a bounty label. Does Drizzle ORM offer bounties for bug fixes? If so, could you please add the appropriate bounty label? Thanks for your time! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the MySQL
binaryandvarbinarycolumn types to correctly returnBufferinstead ofstring, along with comprehensive test coverage.Changes
Fixed
drizzle-orm/src/mysql-core/columns/binary.ts: Correct return type toBufferdrizzle-orm/src/mysql-core/columns/varbinary.ts: Correct return type toBufferdrizzle-orm/src/mysql-core/columns/custom.ts: Enhanced custom type handlingdrizzle-orm/src/query-builders/select.types.ts: Fixed type inference for nested selectsAdded Tests
binary.test.ts: Comprehensive tests for binary/varbinary Buffer typescustom-select.test.ts: Tests for custom column type selectioncustom-wrap.test.ts: Tests for custom column type wrappingnested-select.test.ts: Tests for nested select queriesTesting
All tests pass:
Related Issues
Fixes issues with MySQL binary data handling where data was incorrectly returned as string instead of Buffer.
/claim for Algora bounty if applicable