Commit 913ab89
committed
feat(arrow, datetime, decimal, uuid): add support for go-option
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.1 parent 12cb834 commit 913ab89
File tree
12 files changed
+1483
-183
lines changed- arrow
- datetime
- decimal
- uuid
12 files changed
+1483
-183
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments