docs(bigquery): improve Query handles docs - #6212
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive documentation and usage examples to the Query, CompleteQuery, and RunQuery structs in the BigQuery query module. The feedback points out incorrect import paths for QueryReference in the newly added documentation and examples, which would cause broken intra-doc links and rustdoc warnings.
| /// Returns the [`QueryReference`](crate::model::QueryReference) identifying this query execution. | ||
| /// | ||
| /// The reference will be [`QueryReference::Job`] with a query [job reference], | ||
| /// or [`QueryReference::Stateless`] with an opaque query ID if job creation | ||
| /// was skipped. | ||
| /// The reference will be [`QueryReference::Job`](crate::model::QueryReference::Job) containing a BigQuery Query [job reference] | ||
| /// if a job was created, or [`QueryReference::Stateless`](crate::model::QueryReference::Stateless) with an opaque | ||
| /// query ID if the execution ran statelessly via [jobs.query]. |
There was a problem hiding this comment.
The QueryReference type is imported from crate::query::QueryReference (defined in src/bigquery/src/query/query_reference.rs), not crate::model::QueryReference. Using the incorrect path will result in broken intra-doc links and rustdoc warnings, which can fail the CI build.
| /// Returns the [`QueryReference`](crate::model::QueryReference) identifying this query execution. | |
| /// | |
| /// The reference will be [`QueryReference::Job`] with a query [job reference], | |
| /// or [`QueryReference::Stateless`] with an opaque query ID if job creation | |
| /// was skipped. | |
| /// The reference will be [`QueryReference::Job`](crate::model::QueryReference::Job) containing a BigQuery Query [job reference] | |
| /// if a job was created, or [`QueryReference::Stateless`](crate::model::QueryReference::Stateless) with an opaque | |
| /// query ID if the execution ran statelessly via [jobs.query]. | |
| /// Returns the [`QueryReference`](crate::query::QueryReference) identifying this query execution. | |
| /// | |
| /// The reference will be [`QueryReference::Job`](crate::query::QueryReference::Job) containing a BigQuery Query [job reference] | |
| /// if a job was created, or [`QueryReference::Stateless`](crate::query::QueryReference::Stateless) with an opaque | |
| /// query ID if the execution ran statelessly via [jobs.query]. |
References
- Always verify that Rust documentation compiles without warnings (e.g., by running
cargo doc) before merging, because rustdoc warnings (such as bare URLs or unresolved links) will fail CI builds that enforce-D warnings.
| /// ``` | ||
| /// # async fn sample() -> anyhow::Result<()> { | ||
| /// use google_cloud_bigquery::client::BigQuery; | ||
| /// use google_cloud_bigquery::model::QueryReference; |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6212 +/- ##
=======================================
Coverage 96.06% 96.06%
=======================================
Files 268 268
Lines 67175 67175
=======================================
Hits 64534 64534
Misses 2641 2641 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Towards #5844