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 Member Functions | Static Public Member Functions | List of all members
azure::storage::table_query Class Reference

Represents a query against a table. More...

Public Member Functions

 table_query ()
 Initializes a new instance of the azure::storage::table_query class. More...
 
int take_count () const
 Gets the maximum number of entities the query will return. More...
 
void set_take_count (int value)
 Sets the maximum number of entities the query may return. More...
 
const utility::string_t & filter_string () const
 Gets the filter expression to use for the query. More...
 
void set_filter_string (utility::string_t value)
 Sets the filter expression to use for the query. More...
 
const std::vector< utility::string_t > & select_columns () const
 Gets the names of the entity properties to return when the query is executed. More...
 
void set_select_columns (std::vector< utility::string_t > value)
 Sets the names of the entity properties to return when the table query is executed. More...
 

Static Public Member Functions

static WASTORAGE_API const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, const utility::string_t &value)
 Generates a filter condition string for the specified string value. More...
 
static const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, const utility::char_t *value)
 Generates a filter condition string for the specified character value. More...
 
static WASTORAGE_API const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, const std::vector< uint8_t > &value)
 Generates a filter condition string for the specified binary value. More...
 
static const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, bool value)
 Generates a filter condition string for the specified boolean value. More...
 
static const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, utility::datetime value)
 Generates a filter condition string for the specified date/time value. More...
 
static WASTORAGE_API const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, double value)
 Generates a filter condition string for the specified double-precision floating point number value. More...
 
static const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, const utility::uuid &value)
 Generates a filter condition string for the specified GUID value. More...
 
static WASTORAGE_API const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, int32_t value)
 Generates a filter condition string for the specified 32-bit integer value. More...
 
static const utility::string_t generate_filter_condition (const utility::string_t &property_name, const utility::string_t &comparison_operator, int64_t value)
 Generates a filter condition string for the specified 64-bit integer value. More...
 
static const utility::string_t combine_filter_conditions (const utility::string_t &left_filter, const utility::string_t &logical_operator, const utility::string_t &right_filter)
 Creates a filter condition using the specified logical operator on two filter conditions. More...
 

Detailed Description

Represents a query against a table.

Constructor & Destructor Documentation

◆ table_query()

azure::storage::table_query::table_query ( )
inline

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

Member Function Documentation

◆ combine_filter_conditions()

static const utility::string_t azure::storage::table_query::combine_filter_conditions ( const utility::string_t &  left_filter,
const utility::string_t &  logical_operator,
const utility::string_t &  right_filter 
)
inlinestatic

Creates a filter condition using the specified logical operator on two filter conditions.

Parameters
left_filterA string containing the first formatted filter condition.
logical_operatorA string containing the AND operator or the OR operator.
right_filterA string containing the second formatted filter condition.
Returns
A string containing the combined filter expression.

◆ filter_string()

const utility::string_t& azure::storage::table_query::filter_string ( ) const
inline

Gets the filter expression to use for the query.

Returns
A string containing the filter expression.

◆ generate_filter_condition() [1/9]

static WASTORAGE_API const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
const utility::string_t &  value 
)
static

Generates a filter condition string for the specified string value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA string containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [2/9]

static const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
const utility::char_t *  value 
)
inlinestatic

Generates a filter condition string for the specified character value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA character containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [3/9]

static WASTORAGE_API const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
const std::vector< uint8_t > &  value 
)
static

Generates a filter condition string for the specified binary value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA byte array containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [4/9]

static const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
bool  value 
)
inlinestatic

Generates a filter condition string for the specified boolean value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA boolean containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [5/9]

static const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
utility::datetime  value 
)
inlinestatic

Generates a filter condition string for the specified date/time value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA date/time containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [6/9]

static WASTORAGE_API const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
double  value 
)
static

Generates a filter condition string for the specified double-precision floating point number value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA double-precision floating number point containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [7/9]

static const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
const utility::uuid &  value 
)
inlinestatic

Generates a filter condition string for the specified GUID value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA GUID containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [8/9]

static WASTORAGE_API const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
int32_t  value 
)
static

Generates a filter condition string for the specified 32-bit integer value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA 32-bit integer containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ generate_filter_condition() [9/9]

static const utility::string_t azure::storage::table_query::generate_filter_condition ( const utility::string_t &  property_name,
const utility::string_t &  comparison_operator,
int64_t  value 
)
inlinestatic

Generates a filter condition string for the specified 64-bit integer value.

Parameters
property_nameA string containing the name of the property to compare.
comparison_operatorA string containing the comparison operator to use.
valueA 64-bit integer containing the value to compare with the property value.
Returns
A string containing the formatted filter condition.

◆ select_columns()

const std::vector<utility::string_t>& azure::storage::table_query::select_columns ( ) const
inline

Gets the names of the entity properties to return when the query is executed.

Returns
An enumerable collection of strings containing the names of the properties to return when the query is executed.

◆ set_filter_string()

void azure::storage::table_query::set_filter_string ( utility::string_t  value)
inline

Sets the filter expression to use for the query.

Parameters
valueA string containing the filter expression.

◆ set_select_columns()

void azure::storage::table_query::set_select_columns ( std::vector< utility::string_t >  value)
inline

Sets the names of the entity properties to return when the table query is executed.

Parameters
valueAn enumerable collection of strings containing the names of the properties to return when the query is executed.

◆ set_take_count()

void azure::storage::table_query::set_take_count ( int  value)
inline

Sets the maximum number of entities the query may return.

Parameters
valueThe maximum number of entities the query may return.

◆ take_count()

int azure::storage::table_query::take_count ( ) const
inline

Gets the maximum number of entities the query will return.

Returns
The maximum number of entities the query will return.