GPUdb C++ API  Version 5.2.0.0
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 (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. offset and limit are used to page through the results if there are large numbers of unique values. 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 the 'result_table' option is provided then the results are stored in a table with the name given in the option and the results are not returned in the response.

Definition at line 35 of file aggregate_unique.h.

Constructor & Destructor Documentation

gpudb::AggregateUniqueRequest::AggregateUniqueRequest ( )
inline

Constructs an AggregateUniqueRequest object with default parameter values.

Definition at line 42 of file aggregate_unique.h.

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]tableNameName of the table on which the operation will be performed. Must be a valid table in GPUdb.
[in]columnNameName of the column or an expression containing one or more column names on which the unique function would be applied.
[in]offsetA 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]limitA 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. Default value is 10000.
[in]optionsOptional parameters.
  • expression: Optional filter expression to apply to the table.
  • sort_order: String indicating how the returned values should be sorted. Values: 'ascending', 'descending'.
  • result_table: The name of the table used to store the results. If present no results are returned in the response.
Default value is an empty std::map.

Definition at line 83 of file aggregate_unique.h.

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]tableNameName of the table on which the operation will be performed. Must be a valid table in GPUdb.
[in]columnNameName of the column or an expression containing one or more column names on which the unique function would be applied.
[in]offsetA 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]limitA 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. Default value is 10000.
[in]encodingSpecifies the encoding for returned records. Values: 'binary', 'json'. Default value is 'binary'.
[in]optionsOptional parameters.
  • expression: Optional filter expression to apply to the table.
  • sort_order: String indicating how the returned values should be sorted. Values: 'ascending', 'descending'.
  • result_table: The name of the table used to store the results. If present no results are returned in the response.
Default value is an empty std::map.

Definition at line 127 of file aggregate_unique.h.

Member Data Documentation

std::string gpudb::AggregateUniqueRequest::columnName

Definition at line 138 of file aggregate_unique.h.

std::string gpudb::AggregateUniqueRequest::encoding

Definition at line 141 of file aggregate_unique.h.

int64_t gpudb::AggregateUniqueRequest::limit

Definition at line 140 of file aggregate_unique.h.

int64_t gpudb::AggregateUniqueRequest::offset

Definition at line 139 of file aggregate_unique.h.

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

Definition at line 142 of file aggregate_unique.h.

std::string gpudb::AggregateUniqueRequest::tableName

Definition at line 137 of file aggregate_unique.h.


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