pub struct CloudTable<C>where
C: Client,{ /* private fields */ }
Expand description
Represents a table in the Microsoft Azure Table service.
Implementations§
Source§impl<C> CloudTable<C>where
C: Client,
impl<C> CloudTable<C>where
C: Client,
Sourcepub fn new<T: Into<String>>(client: TableClient<C>, table: T) -> Self
pub fn new<T: Into<String>>(client: TableClient<C>, table: T) -> Self
Creates an CloadTable using the specified client and table name
Sourcepub async fn create(&self) -> Result<(), AzureError>
pub async fn create(&self) -> Result<(), AzureError>
Creates the table in the storage service with default request options.
Sourcepub async fn create_if_not_exists(&self) -> Result<(), AzureError>
pub async fn create_if_not_exists(&self) -> Result<(), AzureError>
Creates the table in the storage service using default request options if it does not already exist.
pub async fn get<T>(
&self,
partition_key: &str,
row_key: &str,
etag: Option<&str>,
) -> Result<Option<TableEntity<T>>, AzureError>where
T: DeserializeOwned,
Sourcepub async fn insert<T>(
&self,
partition_key: &str,
row_key: &str,
payload: T,
) -> Result<TableEntity<T>, AzureError>where
T: Serialize + DeserializeOwned,
pub async fn insert<T>(
&self,
partition_key: &str,
row_key: &str,
payload: T,
) -> Result<TableEntity<T>, AzureError>where
T: Serialize + DeserializeOwned,
Insert a new entity into the table. If entity already exists, the operation fails. See https://docs.microsoft.com/en-us/rest/api/storageservices/insert-entity
pub async fn insert_entity<T>(
&self,
entity: TableEntity<T>,
) -> Result<TableEntity<T>, AzureError>where
T: Serialize + DeserializeOwned,
Sourcepub async fn insert_or_update<T>(
&self,
partition_key: &str,
row_key: &str,
payload: T,
) -> Result<TableEntity<T>, AzureError>
pub async fn insert_or_update<T>( &self, partition_key: &str, row_key: &str, payload: T, ) -> Result<TableEntity<T>, AzureError>
Insert or updates an entity. Even if the entity is already present the operation succeeds and the entity is replaced. See https://docs.microsoft.com/en-us/rest/api/storageservices/insert-or-replace-entity
pub async fn insert_or_update_entity<T>( &self, entity: TableEntity<T>, ) -> Result<TableEntity<T>, AzureError>
Sourcepub async fn update_entity<T>(
&self,
entity: TableEntity<T>,
) -> Result<TableEntity<T>, AzureError>where
T: Serialize + DeserializeOwned,
pub async fn update_entity<T>(
&self,
entity: TableEntity<T>,
) -> Result<TableEntity<T>, AzureError>where
T: Serialize + DeserializeOwned,
Update an existing entity. See https://docs.microsoft.com/en-us/rest/api/storageservices/update-entity2
pub async fn delete( &self, partition_key: &str, row_key: &str, etag: Option<&str>, ) -> Result<(), AzureError>
pub async fn delete_entity<'a, T>( &self, entity: TableEntity<T>, ) -> Result<(), AzureError>
pub async fn execute_query<T>(
&self,
query: Option<&str>,
continuation: &mut Continuation,
) -> Result<Option<Vec<TableEntity<T>>>, AzureError>where
T: DeserializeOwned + Serialize,
pub fn stream_query<'a, T>(
&'a self,
query: Option<&'a str>,
) -> impl Stream<Item = Result<Vec<TableEntity<T>>, AzureError>> + 'awhere
T: Serialize + DeserializeOwned + 'a,
pub async fn execute_batch(&self, batch: Batch) -> Result<(), AzureError>
Trait Implementations§
Source§impl<C> Clone for CloudTable<C>
impl<C> Clone for CloudTable<C>
Source§fn clone(&self) -> CloudTable<C>
fn clone(&self) -> CloudTable<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more