Skip to content

bigquery: support a ValueLoader for maps or structs #399

@jba

Description

@jba

ValueLoader takes a slice of values, whereas ValueSaver produces a map[string]Value. This difference reflects what the underlying API produces/consumes.

For users that just want to deal with a slice of values and not worry about maps, we have ValuesSaver which can convert a slice of values to a map[string]Value, with the aid of a Schema.

It might be nice to similarly provide another adapter that implements ValueLoader, but stores the data in a map, so something like:

type MapLoader map[string]Value

func (ml MapLoader) Load(v []Value, s Schema) error {
  // TODO
}

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions