GPUdb C++ API  Version 6.2.0.3
gpudb::RecordRetriever Class Reference

The multi-head record retriever class. More...

#include <gpudb/RecordRetriever.hpp>

Inherits noncopyable.

Public Member Functions

 RecordRetriever (const gpudb::GPUdb &db, const gpudb::Type &record_type, const std::string &table_name, const WorkerList &worker_list)
 
 RecordRetriever (const gpudb::GPUdb &db, const gpudb::Type &record_type, const std::string &table_name)
 
 ~RecordRetriever ()
 
const std::string & getTableName () const
 Returns the name of the table on which this class operates. More...
 
const gpudb::GPUdbgetGPUdb () const
 Returns the GPUdb client handle that this class uses internally. More...
 
GetRecordsResponse< gpudb::GenericRecordgetRecordsByKey (const gpudb::GenericRecord &record, const std::string &expression="")
 Retrieves records for a given shard key, optionally further limited by an additional expression. More...
 

Detailed Description

The multi-head record retriever class.

Using this class is significantly more computation-intensive compared to a regular insertion. So, it is highly recommended to use this ingestor only if multi-head ingestion is actually turned on in the server and there is a large volume of records to be inserted.

Also, for now, only key-lookup is available via this class, meaning, the user has to supply the values for all the shard columns via the get_records_by_key() method; also, this method does not support unsharded tables.

Definition at line 37 of file RecordRetriever.hpp.

Constructor & Destructor Documentation

◆ RecordRetriever() [1/2]

gpudb::RecordRetriever::RecordRetriever ( const gpudb::GPUdb db,
const gpudb::Type record_type,
const std::string &  table_name,
const WorkerList worker_list 
)

◆ RecordRetriever() [2/2]

gpudb::RecordRetriever::RecordRetriever ( const gpudb::GPUdb db,
const gpudb::Type record_type,
const std::string &  table_name 
)

◆ ~RecordRetriever()

gpudb::RecordRetriever::~RecordRetriever ( )

Member Function Documentation

◆ getGPUdb()

const gpudb::GPUdb& gpudb::RecordRetriever::getGPUdb ( ) const
inline

Returns the GPUdb client handle that this class uses internally.

Definition at line 60 of file RecordRetriever.hpp.

◆ getRecordsByKey()

GetRecordsResponse<gpudb::GenericRecord> gpudb::RecordRetriever::getRecordsByKey ( const gpudb::GenericRecord record,
const std::string &  expression = "" 
)

Retrieves records for a given shard key, optionally further limited by an additional expression.

All records matching the key and satisfying the expression will be returned, up to the system-defined limit. For multi-head mode the request will be sent directly to the appropriate worker.

All fields in both the shard key and the expression must have defined attribute indexes, unless the shard key is also a primary key and all referenced fields are in the primary key. The expression must be limited to basic equality and inequality comparisons that can be evaluated using the attribute indexes.

Parameters
[in]key_valuesA vector of shard column values
[in]expressionAn optional expression. Default is an empty string.
Returns

◆ getTableName()

const std::string& gpudb::RecordRetriever::getTableName ( ) const
inline

Returns the name of the table on which this class operates.

Definition at line 55 of file RecordRetriever.hpp.


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