GPUdb C++ API  Version 7.2.2.4
gpudb::GetRecordsByColumnRequest Struct Reference

A set of parameters for GPUdb::getRecordsByColumn. More...

#include <gpudb/protocol/get_records_by_column.h>

Public Member Functions

 GetRecordsByColumnRequest ()
 Constructs a GetRecordsByColumnRequest object with default parameters. More...
 
 GetRecordsByColumnRequest (const std::string &tableName_, const std::vector< std::string > &columnNames_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_)
 Constructs a GetRecordsByColumnRequest object with the specified parameters. More...
 
 GetRecordsByColumnRequest (const std::string &tableName_, const std::vector< std::string > &columnNames_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::map< std::string, std::string > &options_)
 Constructs a GetRecordsByColumnRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 Name of the table or view on which this operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules. More...
 
std::vector< std::string > columnNames
 The list of column values to retrieve. 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; either binary or json. More...
 
std::map< std::string, std::string > options
 

Detailed Description

A set of parameters for GPUdb::getRecordsByColumn.

For a given table, retrieves the values from the requested column(s). Maps of column name to the array of values as well as the column data type are returned. This endpoint supports pagination with the offset and limit parameters.

Window functions, which can perform operations like moving averages, are available through this endpoint as well as GPUdb::createProjection.

When using pagination, if the table (or the underlying table in the case of a view) is modified (records are inserted, updated, or deleted) during a call to the endpoint, the records or values retrieved may differ between calls based on the type of the update, e.g., the contiguity across pages cannot be relied upon.

If tableName is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (NOW()), identity (USER()), or constant-based functions (GEODIST(-77.11, 38.88, -71.06, 42.36)).

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

Definition at line 48 of file get_records_by_column.h.

Constructor & Destructor Documentation

◆ GetRecordsByColumnRequest() [1/3]

gpudb::GetRecordsByColumnRequest::GetRecordsByColumnRequest ( )
inline

Constructs a GetRecordsByColumnRequest object with default parameters.

Definition at line 54 of file get_records_by_column.h.

◆ GetRecordsByColumnRequest() [2/3]

gpudb::GetRecordsByColumnRequest::GetRecordsByColumnRequest ( const std::string &  tableName_,
const std::vector< std::string > &  columnNames_,
const int64_t  offset_,
const int64_t  limit_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a GetRecordsByColumnRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table or view on which this operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. An empty table name retrieves one record from a single-row virtual table, where columns specified should be constants or constant expressions.
[in]columnNames_The list of column values to retrieve.
[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_ The default value is an empty map.

Definition at line 179 of file get_records_by_column.h.

◆ GetRecordsByColumnRequest() [3/3]

gpudb::GetRecordsByColumnRequest::GetRecordsByColumnRequest ( const std::string &  tableName_,
const std::vector< std::string > &  columnNames_,
const int64_t  offset_,
const int64_t  limit_,
const std::string &  encoding_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a GetRecordsByColumnRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table or view on which this operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. An empty table name retrieves one record from a single-row virtual table, where columns specified should be constants or constant expressions.
[in]columnNames_The list of column values to retrieve.
[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; either binary or json. Supported values: The default value is get_records_by_column_binary.
[in]options_ The default value is an empty map.

Definition at line 320 of file get_records_by_column.h.

Member Data Documentation

◆ columnNames

std::vector<std::string> gpudb::GetRecordsByColumnRequest::columnNames

The list of column values to retrieve.

Definition at line 343 of file get_records_by_column.h.

◆ encoding

std::string gpudb::GetRecordsByColumnRequest::encoding

Specifies the encoding for returned records; either binary or json.

Supported values:

The default value is get_records_by_column_binary.

Definition at line 382 of file get_records_by_column.h.

◆ limit

int64_t gpudb::GetRecordsByColumnRequest::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 366 of file get_records_by_column.h.

◆ offset

int64_t gpudb::GetRecordsByColumnRequest::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 351 of file get_records_by_column.h.

◆ options

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

The default value is an empty map.

Definition at line 440 of file get_records_by_column.h.

◆ tableName

std::string gpudb::GetRecordsByColumnRequest::tableName

Name of the table or view on which this operation will be performed, in [ schema_name. ]table_name format, using standard name resolution rules.

An empty table name retrieves one record from a single-row virtual table, where columns specified should be constants or constant expressions.

Definition at line 338 of file get_records_by_column.h.


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