feat: support get_many with unknown key#174
Merged
liuq19 merged 1 commit intocloudwego:v0.5from Apr 9, 2025
Merged
Conversation
00e6248 to
a99ab86
Compare
a99ab86 to
15668d5
Compare
15668d5 to
214e682
Compare
liuq19
approved these changes
Apr 9, 2025
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.
What type of PR is this?
feat: support get_many with unknown key
Check the PR title.
Translate the PR title into Chinese.
get_many 相关方法支持入参中存在未知路径
More detailed description for this PR(en: English/zh: Chinese).
This PR enhances and break change the get_many function to handle unknown keys gracefully. The function now returns a Result<Vec<Option<LazyValue>>> instead of Result<Vec<LazyValue>>, allowing it to represent unknown keys as None values. This change improves the flexibility and robustness of the function, especially when dealing with dynamic or partially unknown JSON structures.
Breaking Changes:
This enhancement allows users to query for multiple fields, including potentially unknown ones, without causing errors for missing keys. It provides a more flexible way to handle varying JSON structures in a single operation.
允许 get_many 相关方法的入参中存在未知路径。
不兼容变更: