lquerel / gcp-bigquery-client

GCP BigQuery Client (Rust)
Apache License 2.0
97 stars 64 forks source link

ResultSet expects schema only when job is complete and supports requesting tokens when required #3

Closed Robtova closed 3 years ago

Robtova commented 3 years ago

Just made a couple of changes. The first is for ResultSet to only expect the rows and schema fields when jobComplete = true as they are not present before this.

The second is to update the job, table, tabledata and dataset APIs to have ServiceAccountAuthenticator fields from which they request tokens when one of their methods is called. This is to utilise yup_oauth2's caching and auto-refreshing of tokens that expire.

lquerel commented 3 years ago

Will be able to look at this PR after my day job. Thanks

lquerel commented 3 years ago

LGTM. Thanks. Will merge this PR with some other improvements made recently and will publish a new version of the crate today.

lquerel commented 3 years ago

Version 0.6 published on crates.io with the following improvements: