Skip to content

Commit

Permalink
docs: correct some bigquery README sample (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Galen Rice authored Apr 5, 2024
1 parent 0ab379e commit db94b05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bigquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from a metadata server.
This is also described in [google-cloud-auth](https://github.com/yoshidan/google-cloud-rust/blob/main/foundation/auth/README.md)

```rust
use google_cloud_pubsub::client::{ClientConfig, Client};
use google_cloud_bigquery::client::{ClientConfig, Client};

async fn run() {
let (config, project_id) = ClientConfig::new_with_auth().await.unwrap();
Expand Down Expand Up @@ -56,8 +56,8 @@ async fn run(client: &Client, project_id: &str) {
query: "SELECT * FROM dataset.table".to_string(),
..Default::default()
};
let mut iter = client.query(project_id, request).await.unwrap();
while let Some(row) = iter.next::<Row>().await.unwrap() {
let mut iter = client.query::<Row>(project_id, request).await.unwrap();
while let Some(row) = iter.next().await.unwrap() {
let col1 = row.column::<String>(0);
let col2 = row.column::<Option<String>>(1);
}
Expand Down

0 comments on commit db94b05

Please sign in to comment.