pub struct BigqueryTableClient { /* private fields */ }Implementations§
Source§impl BigqueryTableClient
impl BigqueryTableClient
pub fn new(inner: Arc<BigqueryClient>) -> Self
Sourcepub async fn create(&self, metadata: &Table) -> Result<Table, Error>
pub async fn create(&self, metadata: &Table) -> Result<Table, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/create
use google_cloud_bigquery::http::bigquery_table_client::BigqueryTableClient;
use google_cloud_bigquery::http::error::Error;
use google_cloud_bigquery::http::table::{Table, TableFieldSchema, TableFieldType, TableReference, TableSchema};
async fn run(client: BigqueryTableClient) -> Result<Table, Error> {
let table = Table {
table_reference: TableReference {
project_id: "project".to_string(),
dataset_id: "dataset".to_string(),
table_id: "table".to_string()
},
schema: Some(TableSchema {
fields: vec![
TableFieldSchema {
name: "col1".to_string(),
data_type: TableFieldType::String,
max_length: Some(32),
..Default::default()
}
]
}),
..Default::default()
};
client.create(&table).await
}Sourcepub async fn delete(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
) -> Result<(), Error>
pub async fn delete( &self, project_id: &str, dataset_id: &str, table_id: &str, ) -> Result<(), Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/delete
Sourcepub async fn patch(&self, metadata: &Table) -> Result<Table, Error>
pub async fn patch(&self, metadata: &Table) -> Result<Table, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/patch
Sourcepub async fn get(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
) -> Result<Table, Error>
pub async fn get( &self, project_id: &str, dataset_id: &str, table_id: &str, ) -> Result<Table, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/get
Sourcepub async fn get_iam_policy(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
req: &GetIamPolicyRequest,
) -> Result<Policy, Error>
pub async fn get_iam_policy( &self, project_id: &str, dataset_id: &str, table_id: &str, req: &GetIamPolicyRequest, ) -> Result<Policy, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/get_iam_policy
Sourcepub async fn set_iam_policy(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
req: &SetIamPolicyRequest,
) -> Result<Policy, Error>
pub async fn set_iam_policy( &self, project_id: &str, dataset_id: &str, table_id: &str, req: &SetIamPolicyRequest, ) -> Result<Policy, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/set_iam_policy
Sourcepub async fn test_iam_permissions(
&self,
project_id: &str,
dataset_id: &str,
table_id: &str,
req: &TestIamPermissionsRequest,
) -> Result<TestIamPermissionsResponse, Error>
pub async fn test_iam_permissions( &self, project_id: &str, dataset_id: &str, table_id: &str, req: &TestIamPermissionsRequest, ) -> Result<TestIamPermissionsResponse, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/test_iam_policy
Sourcepub async fn list(
&self,
project_id: &str,
dataset_id: &str,
req: &ListTablesRequest,
) -> Result<Vec<TableOverview>, Error>
pub async fn list( &self, project_id: &str, dataset_id: &str, req: &ListTablesRequest, ) -> Result<Vec<TableOverview>, Error>
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list
Trait Implementations§
Source§impl Clone for BigqueryTableClient
impl Clone for BigqueryTableClient
Source§fn clone(&self) -> BigqueryTableClient
fn clone(&self) -> BigqueryTableClient
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 BigqueryTableClient
impl !RefUnwindSafe for BigqueryTableClient
impl Send for BigqueryTableClient
impl Sync for BigqueryTableClient
impl Unpin for BigqueryTableClient
impl !UnwindSafe for BigqueryTableClient
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