Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Types | Public Member Functions | Friends | List of all members
azure::storage::table_entity Class Reference

Represents an entity in a table. More...

Public Types

typedef std::unordered_map< utility::string_t, azure::storage::entity_propertyproperties_type
 
typedef std::unordered_map< utility::string_t, azure::storage::entity_property >::value_type property_type
 

Public Member Functions

 table_entity ()
 Initializes a new instance of the azure::storage::table_entity class. More...
 
 table_entity (utility::string_t partition_key, utility::string_t row_key)
 Initializes a new instance of the azure::storage::table_entity class with the specified partition key and row key. More...
 
 table_entity (utility::string_t partition_key, utility::string_t row_key, utility::string_t etag, properties_type properties)
 Initializes a new instance of the azure::storage::table_entity class with the entity's partition key, row key, ETag (if available/required), and properties. More...
 
properties_type & properties ()
 Gets the properties in the table entity, indexed by property name. More...
 
const properties_type & properties () const
 Gets the properties in the table entity, indexed by property name. More...
 
const utility::string_t & partition_key () const
 Gets the entity's partition key. More...
 
void set_partition_key (utility::string_t partition_key)
 Sets the entity's partition key. More...
 
const utility::string_t & row_key () const
 Gets the entity's row key. More...
 
void set_row_key (utility::string_t row_key)
 Sets the entity's row key. More...
 
utility::datetime timestamp () const
 Gets the entity's timestamp. More...
 
const utility::string_t & etag () const
 Gets the entity's current ETag. More...
 
void set_etag (utility::string_t etag)
 Sets the entity's current ETag. More...
 

Friends

table_entity protocol::parse_table_entity (const web::json::value &document)
 

Detailed Description

Represents an entity in a table.

Constructor & Destructor Documentation

◆ table_entity() [1/3]

azure::storage::table_entity::table_entity ( )
inline

Initializes a new instance of the azure::storage::table_entity class.

◆ table_entity() [2/3]

azure::storage::table_entity::table_entity ( utility::string_t  partition_key,
utility::string_t  row_key 
)
inline

Initializes a new instance of the azure::storage::table_entity class with the specified partition key and row key.

Parameters
partition_keyThe partition key value for the entity.
row_keyThe row key value for the entity.

◆ table_entity() [3/3]

azure::storage::table_entity::table_entity ( utility::string_t  partition_key,
utility::string_t  row_key,
utility::string_t  etag,
properties_type  properties 
)
inline

Initializes a new instance of the azure::storage::table_entity class with the entity's partition key, row key, ETag (if available/required), and properties.

Parameters
partition_keyThe entity's partition key.
row_keyThe entity's row key.
etagThe entity's current ETag.
propertiesThe entity's properties, indexed by property name.

Member Function Documentation

◆ etag()

const utility::string_t& azure::storage::table_entity::etag ( ) const
inline

Gets the entity's current ETag.

Returns
The entity's ETag value, as a string.

Set this value to "*" in order to overwrite an entity as part of an update operation.

◆ partition_key()

const utility::string_t& azure::storage::table_entity::partition_key ( ) const
inline

Gets the entity's partition key.

Returns
The entity partition key.

◆ properties() [1/2]

properties_type& azure::storage::table_entity::properties ( )
inline

Gets the properties in the table entity, indexed by property name.

Returns
The entity properties.

◆ properties() [2/2]

const properties_type& azure::storage::table_entity::properties ( ) const
inline

Gets the properties in the table entity, indexed by property name.

Returns
The entity properties.

◆ row_key()

const utility::string_t& azure::storage::table_entity::row_key ( ) const
inline

Gets the entity's row key.

Returns
The entity row key.

◆ set_etag()

void azure::storage::table_entity::set_etag ( utility::string_t  etag)
inline

Sets the entity's current ETag.

Parameters
etagThe entity's ETag value, as a string.

Set this value to "*" in order to overwrite an entity as part of an update operation.

◆ set_partition_key()

void azure::storage::table_entity::set_partition_key ( utility::string_t  partition_key)
inline

Sets the entity's partition key.

Parameters
partition_keyThe entity partition key.

◆ set_row_key()

void azure::storage::table_entity::set_row_key ( utility::string_t  row_key)
inline

Sets the entity's row key.

Parameters
row_keyThe entity row key.

◆ timestamp()

utility::datetime azure::storage::table_entity::timestamp ( ) const
inline

Gets the entity's timestamp.

Returns
The entity timestamp.