Skip to content

Conversation

@bigbes
Copy link
Collaborator

@bigbes bigbes commented Sep 4, 2025

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, and UUID types.

The following changes have been made:

  • Added go:generate directives to the Arrow, Datetime, Interval, Decimal, and UUID 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.

Closes #TNTP-3735.

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`, and `UUID` types.

The following changes have been made:
- Added `go:generate` directives to the `Arrow`, `Datetime`, `Interval`,
  `Decimal`, and `UUID` 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.
@bigbes bigbes deleted the branch v3 September 5, 2025 09:36
@bigbes bigbes closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants