googleapis / googleapis/google-cloud-go
bigquery: add embedded type or interface for nullable fields that provides Valid check for usefulness
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
**Is your feature request related to a problem? Please describe.**
I am loading data from a plethora of nullable fields of differing types, the content of which is out of my control. I need to take said data and, provided the right fields have values, mutate or copy the data and forward the data to a third party API.
As such, the validity of the data is a product of all of the instances of Nullable types' `Valid` property being `true`. At the moment, each nullable has its own `Valid` property, meaning I would need to use reflection.
**Describe the solution you'd like**
A base type or interface for all nullable fields offering a `Valid bool` or `Valid() bool` interface
**Describe alternatives you've considered**
I could use reflection, however it feels this would be useful upstream in the library
**Additional context**
None at present
Contributor guide
Assessment
This issue has not been assessed yet.