-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
None
-
Go Drivers
-
None
-
None
-
None
-
None
-
None
-
None
This library contains a RawValueTo() generic function that simplifies the work of converting a RawValue to a Go value.
It’d be sweet if the driver had the same thing for Go 1.27+, e.g.:
ts, err := rv.As[bson.Timestamp]()
The same file contains a ToRawValue() function that could nicely be a static `bson.RawValue.From()` generic function.
Like GODRIVER-4175, this assumes a set of types established as easily-convertible.
Build tags would avoid breaking Go 1.26 & prior. (Though the From() static function would work for pre-1.27.)
- depends on
-
GODRIVER-4094 Bump the minimum Go version to 1.27
-
- Backlog
-
- related to
-
GODRIVER-4092 session.WithTransaction should have a generic equivalent in Go 1.27
-
- Blocked
-
-
GODRIVER-4175 Create generic Extract() method for Go 1.27+
-
- Blocked
-