-
Notifications
You must be signed in to change notification settings - Fork 144
RUST-870 Support deserializing directly from raw BSON #276
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
Merged
patrickfreed
merged 32 commits into
mongodb:master
from
patrickfreed:RUST-870/raw-bson-deserialize
Jul 8, 2021
Merged
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7d1e550
wip raw deserializer
patrickfreed 799f18b
wip binary
patrickfreed 382b742
wip raw deserialization
patrickfreed 4b70b1f
finish datetime deserialization
patrickfreed 761068c
regex deserialization
patrickfreed 845e9f8
dbpointer code code w scope
patrickfreed ca69e9b
take ownership in to_extended_document
patrickfreed fdec423
timestamp
patrickfreed 2ca22ea
minkey maxkey
patrickfreed 9030336
decimal128
patrickfreed 45a99ad
combine documentaccess and seqaccess
patrickfreed 488ed41
deduplicate deserialization logic
patrickfreed 3b44841
wip corpus
patrickfreed 6728082
finish corpus
patrickfreed 1f667bb
ensure serde tests are passing, decimal128, enums
patrickfreed 93ca2fe
slice based deserialization
patrickfreed caa9f5b
borrow keys in Bson deserialization
patrickfreed 3647aa8
Revert "borrow keys in Bson deserialization"
patrickfreed 90942ba
add test for all types
patrickfreed cc8c8ff
various cleanup
patrickfreed e14a74f
bump MSRV to 1.48
patrickfreed 916e782
handle overreads
patrickfreed e9b38d3
consolidate key deserialization
patrickfreed 77668c6
enable decimal128 tests, use $decimal128 instead of $decimal128Bytes
patrickfreed 1ab13af
fully support borrowed deserialization
patrickfreed a88d7dd
test borrowing some other types
patrickfreed 0511f69
reintroduce support for deserializing decimal128 from extended json
patrickfreed de68ee9
fix typo
patrickfreed 2db5468
move element type deserialization logic into deserializer
patrickfreed d10410b
fix typo
patrickfreed e3036ce
support lossy and non-lossy UTF-8 decoding
patrickfreed b062873
fix docstring
patrickfreed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,9 @@ authors = ["Kevin Yeh <[email protected]>"] | |
edition = "2018" | ||
|
||
[dependencies] | ||
bson = { path = ".." } | ||
bson = { path = "..", features = ["decimal128"] } | ||
serde = { version = "1.0", features = ["derive"] } | ||
pretty_assertions = "0.6.1" | ||
|
||
[lib] | ||
name = "serde_tests" | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver is currently on 1.47, but in order to ergonomically convert between a
Vec<u8>
and an array of bytes forDecimal128
, I needed Rust 1.48. I'm sort of thinking we should consider bumping this all the way to the latest stable right before the 2.0.0 release to give us the newest possible version to work with for a while. Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm as well