pub struct BigqueryTabledataClient { /* private fields */ }Implementations§
Source§impl BigqueryTabledataClient
impl BigqueryTabledataClient
pub fn new(inner: Arc<BigqueryClient>) -> Self
Sourcepub async fn insert<T: Serialize>(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
req: &InsertAllRequest<T>,
) -> Result<InsertAllResponse, Error>
pub async fn insert<T: Serialize>( &self, project_id: &str, dataset_id: &str, table_id: &str, req: &InsertAllRequest<T>, ) -> Result<InsertAllResponse, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insert
use google_cloud_bigquery::http::tabledata::insert_all::{InsertAllRequest, Row};
use google_cloud_bigquery::http::bigquery_tabledata_client::BigqueryTabledataClient;
#[derive(serde::Serialize)]
pub struct TestData {
pub col1: String,
}
async fn run(client: &BigqueryTabledataClient, project_id: &str, data: TestData) {
let data1 = Row {
insert_id: None,
json: data,
};
let request = InsertAllRequest {
rows: vec![data1],
..Default::default()
};
let result = client.insert(project_id, "dataset", "table", &request).await.unwrap();
let error = result.insert_errors;
}Sourcepub async fn read(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
req: &FetchDataRequest,
) -> Result<FetchDataResponse, Error>
pub async fn read( &self, project_id: &str, dataset_id: &str, table_id: &str, req: &FetchDataRequest, ) -> Result<FetchDataResponse, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/list
Trait Implementations§
Source§impl Clone for BigqueryTabledataClient
impl Clone for BigqueryTabledataClient
Source§fn clone(&self) -> BigqueryTabledataClient
fn clone(&self) -> BigqueryTabledataClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BigqueryTabledataClient
impl !RefUnwindSafe for BigqueryTabledataClient
impl Send for BigqueryTabledataClient
impl Sync for BigqueryTabledataClient
impl Unpin for BigqueryTabledataClient
impl !UnwindSafe for BigqueryTabledataClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request