GPUdb C++ API  Version 6.2.0.3
gpudb::AppendRecordsRequest Struct Reference

A set of input parameters for appendRecords(const AppendRecordsRequest&) const. More...

#include <gpudb/protocol/append_records.h>

Public Member Functions

 AppendRecordsRequest ()
 Constructs an AppendRecordsRequest object with default parameter values. More...
 
 AppendRecordsRequest (const std::string &tableName_, const std::string &sourceTableName_, const std::map< std::string, std::string > &fieldMap_, const std::map< std::string, std::string > &options_)
 Constructs an AppendRecordsRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 
std::string sourceTableName
 
std::map< std::string, std::string > fieldMap
 
std::map< std::string, std::string > options
 

Detailed Description

A set of input parameters for appendRecords(const AppendRecordsRequest&) const.

Append (or insert) all records from a source table (specified by sourceTableName) to a particular target table (specified by tableName). The field map (specified by fieldMap) holds the user specified map of target table column names with their mapped source column names.

Definition at line 22 of file append_records.h.

Constructor & Destructor Documentation

◆ AppendRecordsRequest() [1/2]

gpudb::AppendRecordsRequest::AppendRecordsRequest ( )
inline

Constructs an AppendRecordsRequest object with default parameter values.

Definition at line 29 of file append_records.h.

◆ AppendRecordsRequest() [2/2]

gpudb::AppendRecordsRequest::AppendRecordsRequest ( const std::string &  tableName_,
const std::string &  sourceTableName_,
const std::map< std::string, std::string > &  fieldMap_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an AppendRecordsRequest object with the specified parameters.

Parameters
[in]tableName_The table name for the records to be appended. Must be an existing table.
[in]sourceTableName_The source table name to get records from. Must be an existing table name.
[in]fieldMap_Contains the mapping of column names from the target table (specified by tableName) as the keys, and corresponding column names or expressions (e.g., 'col_name+1') from the source table (specified by sourceTableName). Must be existing column names in source table and target table, and their types must be matched. For details on using expressions, see Expressions.
[in]options_Optional parameters.
  • gpudb::append_records_offset: A positive integer indicating the number of initial results to skip from source table (specified by sourceTableName). Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT. The default value is '0'.
  • gpudb::append_records_limit: A positive integer indicating the maximum number of results to be returned from source table (specified by sourceTableName). Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is '-9999'.
  • gpudb::append_records_expression: Optional filter expression to apply to the source table (specified by sourceTableName). Empty by default. The default value is ''.
  • gpudb::append_records_order_by: Comma-separated list of the columns and expressions to be sorted by from the source table (specified by sourceTableName); e.g. 'timestamp asc, x desc'. The order_by columns do not have to be present in fieldMap. The default value is ''.
  • gpudb::append_records_update_on_existing_pk: Specifies the record collision policy for inserting the source table records (specified by sourceTableName) into the target table (specified by tableName) table with a primary key. If set to true, any existing target table record with primary key values that match those of a source table record being inserted will be replaced by that new record. If set to false, any existing target table record with primary key values that match those of a source table record being inserted will remain unchanged and the new record discarded. If the specified table does not have a primary key, then this option is ignored. The default value is gpudb::append_records_false.
  • gpudb::append_records_truncate_strings: If set to true, it allows inserting unrestricted length strings into charN string columns by truncating the unrestricted length strings to fit. The default value is gpudb::append_records_false.

Definition at line 122 of file append_records.h.

Member Data Documentation

◆ fieldMap

std::map<std::string, std::string> gpudb::AppendRecordsRequest::fieldMap

Definition at line 132 of file append_records.h.

◆ options

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

Definition at line 133 of file append_records.h.

◆ sourceTableName

std::string gpudb::AppendRecordsRequest::sourceTableName

Definition at line 131 of file append_records.h.

◆ tableName

std::string gpudb::AppendRecordsRequest::tableName

Definition at line 130 of file append_records.h.


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