bigquery: support constraints.Integer for QueryParameter #8662
Labels
api: bigquery
Issues related to the BigQuery API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
When passing in a slice of query params, if you have a typed integer (in my case now a proto enum), BigQuery rejects the query as invalid for an Int64 field. e.g.
Describe the solution you'd like
Now that generics are out and available in all supported Go versions, it should be trivial to transparently support variations with
constraints.Integer
. If you wanted to be extra careful, you could write your own version of the constraint to excludeuint64
to prevent truly unsupported values through.Describe alternatives you've considered
We're manually converting slices ourselves now.
The text was updated successfully, but these errors were encountered: