GPUdb C++ API
Version 7.2.2.4
|
A set of parameters for GPUdb::aggregateUnique. More...
#include <gpudb/protocol/aggregate_unique.h>
Public Member Functions | |
AggregateUniqueRequest () | |
Constructs an AggregateUniqueRequest object with default parameters. 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 |
Name of an existing table or view on which the operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules. More... | |
std::string | columnName |
Name of the column or an expression containing one or more column names on which the unique function would be applied. More... | |
int64_t | offset |
A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). More... | |
int64_t | limit |
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. More... | |
std::string | encoding |
Specifies the encoding for returned records. More... | |
std::map< std::string, std::string > | options |
Optional parameters. More... | |
A set of parameters for GPUdb::aggregateUnique.
Returns all the unique values from a particular column (specified by columnName) of a particular table or view (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 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:
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 the value of columnName is an unrestricted-length string.
Definition at line 56 of file aggregate_unique.h.
|
inline |
Constructs an AggregateUniqueRequest object with default parameters.
Definition at line 61 of file aggregate_unique.h.
|
inline |
Constructs an AggregateUniqueRequest object with the specified parameters.
[in] | tableName_ | Name of an existing table or view on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. |
[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 default value is 0. 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 maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset_ & limit_ to request subsequent pages of results. The default value is -9999. |
[in] | options_ | Optional parameters.
|
Definition at line 301 of file aggregate_unique.h.
|
inline |
Constructs an AggregateUniqueRequest object with the specified parameters.
[in] | tableName_ | Name of an existing table or view on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. |
[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 default value is 0. 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 maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset_ & limit_ to request subsequent pages of results. The default value is -9999. |
[in] | encoding_ | Specifies the encoding for returned records. Supported values:
|
[in] | options_ | Optional parameters.
|
Definition at line 556 of file aggregate_unique.h.
std::string gpudb::AggregateUniqueRequest::columnName |
Name of the column or an expression containing one or more column names on which the unique function would be applied.
Definition at line 578 of file aggregate_unique.h.
std::string gpudb::AggregateUniqueRequest::encoding |
Specifies the encoding for returned records.
Supported values:
The default value is aggregate_unique_binary.
Definition at line 616 of file aggregate_unique.h.
int64_t gpudb::AggregateUniqueRequest::limit |
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned.
The number of records returned will never exceed the server's own limit, defined by the max_get_records_size parameter in the server configuration. Use hasMoreRecords to see if more records exist in the result to be fetched, and offset & limit to request subsequent pages of results. The default value is -9999.
Definition at line 601 of file aggregate_unique.h.
int64_t gpudb::AggregateUniqueRequest::offset |
A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).
The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
Definition at line 586 of file aggregate_unique.h.
std::map<std::string, std::string> gpudb::AggregateUniqueRequest::options |
Optional parameters.
The default value is an empty map.
Definition at line 756 of file aggregate_unique.h.
std::string gpudb::AggregateUniqueRequest::tableName |
Name of an existing table or view on which the operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules.
Definition at line 572 of file aggregate_unique.h.