GPUdb C++ API  Version 6.2.0.3
gpudb::AggregateUniqueRequest Struct Reference

A set of input parameters for aggregateUniqueRaw(const AggregateUniqueRequest&) const. More...

#include <gpudb/protocol/aggregate_unique.h>

Public Member Functions

 AggregateUniqueRequest ()
 Constructs an AggregateUniqueRequest object with default parameter values. More...
 
 AggregateUniqueRequest (const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_)
 Constructs an AggregateUniqueRequest object with the specified parameters. More...
 
 AggregateUniqueRequest (const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::map< std::string, std::string > &options_)
 Constructs an AggregateUniqueRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 
std::string columnName
 
int64_t offset
 
int64_t limit
 
std::string encoding
 
std::map< std::string, std::string > options
 

Detailed Description

A set of input parameters for aggregateUniqueRaw(const AggregateUniqueRequest&) const.

Returns all the unique values from a particular column (specified by columnName) of a particular table or collection (specified by tableName). If columnName is a numeric column the values will be in binaryEncodedResponse. Otherwise if columnName is a string column the values will be in jsonEncodedResponse. The results can be paged via the offset and limit parameters.

Columns marked as store-only are unable to be used with this function.

To get the first 10 unique values sorted in descending order options would be::

{"limit":"10","sort_order":"descending"}.

The response is returned as a dynamic schema. For details see: dynamic schemas documentation.

If a result_table name is specified in the options, the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to standard naming conventions; any column expression will need to be aliased. If the source table's shard key is used as the columnName, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if tableName is a collection or when the value of columnName is an unrestricted-length string.

Definition at line 50 of file aggregate_unique.h.

Constructor & Destructor Documentation

◆ AggregateUniqueRequest() [1/3]

gpudb::AggregateUniqueRequest::AggregateUniqueRequest ( )
inline

Constructs an AggregateUniqueRequest object with default parameter values.

Definition at line 57 of file aggregate_unique.h.

◆ AggregateUniqueRequest() [2/3]

gpudb::AggregateUniqueRequest::AggregateUniqueRequest ( const std::string &  tableName_,
const std::string &  columnName_,
const int64_t  offset_,
const int64_t  limit_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AggregateUniqueRequest object with the specified parameters.

Parameters
[in]tableName_Name of an existing table/collection on which the operation will be performed.
[in]columnName_Name of the column or an expression containing one or more column names on which the unique function would be applied.
[in]offset_A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The minimum allowed value is 0. The maximum allowed value is MAX_INT.
[in]limit_A positive integer indicating the maximum number of results to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned.
[in]options_Optional parameters.

Definition at line 169 of file aggregate_unique.h.

◆ AggregateUniqueRequest() [3/3]

gpudb::AggregateUniqueRequest::AggregateUniqueRequest ( const std::string &  tableName_,
const std::string &  columnName_,
const int64_t  offset_,
const int64_t  limit_,
const std::string &  encoding_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AggregateUniqueRequest object with the specified parameters.

Parameters
[in]tableName_Name of an existing table/collection on which the operation will be performed.
[in]columnName_Name of the column or an expression containing one or more column names on which the unique function would be applied.
[in]offset_A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The minimum allowed value is 0. The maximum allowed value is MAX_INT.
[in]limit_A positive integer indicating the maximum number of results to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned.
[in]encoding_Specifies the encoding for returned records. The default value is gpudb::aggregate_unique_binary.
[in]options_Optional parameters.

Definition at line 292 of file aggregate_unique.h.

Member Data Documentation

◆ columnName

std::string gpudb::AggregateUniqueRequest::columnName

Definition at line 303 of file aggregate_unique.h.

◆ encoding

std::string gpudb::AggregateUniqueRequest::encoding

Definition at line 306 of file aggregate_unique.h.

◆ limit

int64_t gpudb::AggregateUniqueRequest::limit

Definition at line 305 of file aggregate_unique.h.

◆ offset

int64_t gpudb::AggregateUniqueRequest::offset

Definition at line 304 of file aggregate_unique.h.

◆ options

std::map<std::string, std::string> gpudb::AggregateUniqueRequest::options

Definition at line 307 of file aggregate_unique.h.

◆ tableName

std::string gpudb::AggregateUniqueRequest::tableName

Definition at line 302 of file aggregate_unique.h.


The documentation for this struct was generated from the following file: