googleapis / googleapis/google-cloud-go

bigquery: add embedded type or interface for nullable fields that provides Valid check for usefulness

Open
#9,077 3 comments 1 reaction 1 assignee Claimed by @shollyman View on GitHub
api: bigquery type: feature request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.