-
Notifications
You must be signed in to change notification settings - Fork 95
added json unmarshaler for castTo #1825
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
base: master
Are you sure you want to change the base?
added json unmarshaler for castTo #1825
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1825 +/- ##
==========================================
- Coverage 70.81% 70.74% -0.07%
==========================================
Files 386 386
Lines 40234 40252 +18
==========================================
- Hits 28492 28477 -15
- Misses 10575 10596 +21
- Partials 1167 1179 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -1369,6 +1370,16 @@ func (v jsonValue) castTo(dst any) error { | |||
case *[]byte: | |||
*vv = xstring.ToBytes(string(v)) | |||
|
|||
return nil | |||
case json.Unmarshaler: |
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.
Не хватает тестов на эти типы - хотя бы для того, чтобы в будущем не сломать эту функциональность
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.
Не хватает строчки в CHANGELOG.md
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
-
What is the new behavior?
query.Row.ScanStruct supports json.Marshaller, but it does not work in the reverse direction (when receiving data from the database), for this purpose I add json.Unmarshaler for convenient work with QueryClient.
Other information
-