GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gpudb::AppendRecordsRequest Struct Reference

A set of input parameters for 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 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

gpudb::AppendRecordsRequest::AppendRecordsRequest ( )
inline

Constructs an AppendRecordsRequest object with default parameter values.

Definition at line 29 of file append_records.h.

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 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 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 sourceTableName. The default value is ''.
  • gpudb::append_records_order_by: Comma-separated list of the columns to be sorted by from 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 longer strings into smaller charN string columns by truncating the longer strings to fit. The default value is gpudb::append_records_false.

Definition at line 118 of file append_records.h.

Member Data Documentation

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

Definition at line 128 of file append_records.h.

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

Definition at line 129 of file append_records.h.

std::string gpudb::AppendRecordsRequest::sourceTableName

Definition at line 127 of file append_records.h.

std::string gpudb::AppendRecordsRequest::tableName

Definition at line 126 of file append_records.h.


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