GPUdb C++ API  Version 5.2.0.0
gpudb::GetRecordsRequest Struct Reference

A set of input parameters for getRecordsRaw(const GetRecordsRequest&) const. More...

#include <gpudb/protocol/get_records.h>

Public Member Functions

 GetRecordsRequest ()
 Constructs a GetRecordsRequest object with default parameter values. More...
 
 GetRecordsRequest (const std::string &tableName, const int64_t offset, const int64_t limit, const std::map< std::string, std::string > &options)
 Constructs a GetRecordsRequest object with the specified parameters. More...
 
 GetRecordsRequest (const std::string &tableName, const int64_t offset, const int64_t limit, const std::string &encoding, const std::map< std::string, std::string > &options)
 Constructs a GetRecordsRequest object with the specified parameters. More...
 

Public Attributes

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

Detailed Description

A set of input parameters for getRecordsRaw(const GetRecordsRequest&) const.

Retrieves records from a given table, optionally filtered by an expression and/or sorted by a column. This operation can only be performed on tables or on homogeneous collection (collections whose children all have the same type). Records can be returned encoded as binary or json.

This operation supports paging through the data via the offset and limit parameters. Note that when paging through a table, if the table (or the underlying table in case of a view) is updated (records are inserted, deleted or modified) the records retrieved may differ between calls based on the updates applied.

Note that when using the Java API, it is not possible to retrieve records from join tables using this operation.

Definition at line 31 of file get_records.h.

Constructor & Destructor Documentation

gpudb::GetRecordsRequest::GetRecordsRequest ( )
inline

Constructs a GetRecordsRequest object with default parameter values.

Definition at line 37 of file get_records.h.

gpudb::GetRecordsRequest::GetRecordsRequest ( const std::string &  tableName,
const int64_t  offset,
const int64_t  limit,
const std::map< std::string, std::string > &  options 
)
inline

Constructs a GetRecordsRequest object with the specified parameters.

Parameters
[in]tableNameName of the table from which the records will be fetched. Must be a table, view or homogeneous collection.
[in]offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). Default value is 0. 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]options
  • expression: Optional filter expression to apply to the table.
  • sort_by: Optional column that the data should be sorted by. Empty by default (i.e. no sorting is applied).
  • sort_order: String indicating how the returned values should be sorted - ascending or descending. Ignored if 'sort_by' option is not specified. Values: 'ascending', 'descending'.
Default value is an empty std::map.

Definition at line 77 of file get_records.h.

gpudb::GetRecordsRequest::GetRecordsRequest ( const std::string &  tableName,
const int64_t  offset,
const int64_t  limit,
const std::string &  encoding,
const std::map< std::string, std::string > &  options 
)
inline

Constructs a GetRecordsRequest object with the specified parameters.

Parameters
[in]tableNameName of the table from which the records will be fetched. Must be a table, view or homogeneous collection.
[in]offsetA positive integer indicating the number of initial results to skip (this can be useful for paging through the results). Default value is 0. 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]options
  • expression: Optional filter expression to apply to the table.
  • sort_by: Optional column that the data should be sorted by. Empty by default (i.e. no sorting is applied).
  • sort_order: String indicating how the returned values should be sorted - ascending or descending. Ignored if 'sort_by' option is not specified. Values: 'ascending', 'descending'.
Default value is an empty std::map.

Definition at line 120 of file get_records.h.

Member Data Documentation

std::string gpudb::GetRecordsRequest::encoding

Definition at line 132 of file get_records.h.

int64_t gpudb::GetRecordsRequest::limit

Definition at line 131 of file get_records.h.

int64_t gpudb::GetRecordsRequest::offset

Definition at line 130 of file get_records.h.

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

Definition at line 133 of file get_records.h.

std::string gpudb::GetRecordsRequest::tableName

Definition at line 129 of file get_records.h.


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