-
Notifications
You must be signed in to change notification settings - Fork 60
feat(arrow, datetime, decimal, uuid): add support for go-option #459
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
feat(arrow, datetime, decimal, uuid): add support for go-option #459
Conversation
e3ed24c
to
913ab89
Compare
Converted to draft until go-option v1.0.0 is released. |
913ab89
to
9e1d51b
Compare
9e1d51b
to
c45b36a
Compare
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.
Thank you for the patch.
Tests are missing, we need tests for new functionality in the public API.
64ac6f6
to
ae84793
Compare
macOS tests won't work for now (will be fixed by #462) |
ae84793
to
2cb114b
Compare
Please, rebase the PR. |
2cb114b
to
29cfc19
Compare
Add support for `go-option` to the `arrow`, `datetime`, `decimal`, and `uuid` packages. This allows for handling optional values of the `Arrow`, `Datetime`, `Interval`, `Decimal`, `UUID` and `BoxError` types. The following changes have been made: - Added `go:generate` directives to the `Arrow`, `Datetime`, `Interval`, `Decimal`, `UUID` and `BoxError` types to generate optional types using `github.com/tarantool/go-option/cmd/gentypes`. - Implemented `MarshalMsgpack` and `UnmarshalMsgpack` methods for the `Arrow`, `Datetime`, `Interval`, and `Decimal` types. - Added `marshalUUID` and `unmarshalUUID` functions for the `UUID` type. - The generated `_gen.go` files contain the `Optional*` types that wrap the original types and provide methods to handle optional values, including `EncodeMsgpack` and `DecodeMsgpack` for `msgpack` serialization. - Refactored the `datetime` and `decimal` decoders to use the new `UnmarshalMsgpack` methods.
29cfc19
to
7431d70
Compare
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.
LGTM
Add support for
go-option
to thearrow
,datetime
,decimal
, anduuid
packages. This allows for handling optional values of theArrow
,Datetime
,Interval
,Decimal
, andUUID
types.The following changes have been made:
go:generate
directives to theArrow
,Datetime
,Interval
,Decimal
, andUUID
types to generate optional types usinggithub.com/tarantool/go-option/cmd/gentypes
.MarshalMsgpack
andUnmarshalMsgpack
methods for theArrow
,Datetime
,Interval
, andDecimal
types.marshalUUID
andunmarshalUUID
functions for theUUID
type._gen.go
files contain theOptional*
types that wrap the original types and provide methods to handle optional values, includingEncodeMsgpack
andDecodeMsgpack
formsgpack
serialization.datetime
anddecimal
decoders to use the newUnmarshalMsgpack
methods.Closes #TNTP-3735.