GPUdb C++ API  Version 7.2.2.4
gpudb::InsertRecordsRequest< T > Struct Template Reference

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

#include <gpudb/protocol/insert_records.h>

Public Member Functions

 InsertRecordsRequest ()
 Constructs an InsertRecordsRequest object with default parameters. More...
 
 InsertRecordsRequest (const std::string &tableName_, const std::vector< T > &data_, const std::map< std::string, std::string > &options_)
 Constructs an InsertRecordsRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 Name of table to which the records are to be added, in [ schema_name. ]table_name format, using standard name resolution rules. More...
 
std::vector< T > data
 An array of binary-encoded data for the records to be added. More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

template<typename T>
struct gpudb::InsertRecordsRequest< T >

A set of parameters for GPUdb::insertRecords.

Adds multiple records to the specified table. The operation is synchronous, meaning that a response will not be returned until all the records are fully inserted and available. The response payload provides the counts of the number of records actually inserted and/or updated, and can provide the unique identifier of each added record.

The options parameter can be used to customize this function's behavior.

The update_on_existing_pk option specifies the record collision policy for inserting into a table with a primary key, but is ignored if no primary key exists.

The return_record_ids option indicates that the database should return the unique identifiers of inserted records.

Template Parameters
TThe type of object being processed.

Definition at line 778 of file insert_records.h.

Constructor & Destructor Documentation

◆ InsertRecordsRequest() [1/2]

template<typename T >
gpudb::InsertRecordsRequest< T >::InsertRecordsRequest ( )
inline

Constructs an InsertRecordsRequest object with default parameters.

Definition at line 783 of file insert_records.h.

◆ InsertRecordsRequest() [2/2]

template<typename T >
gpudb::InsertRecordsRequest< T >::InsertRecordsRequest ( const std::string &  tableName_,
const std::vector< T > &  data_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs an InsertRecordsRequest object with the specified parameters.

Parameters
[in]tableName_Name of table to which the records are to be added, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.
[in]data_An array of binary-encoded data for the records to be added. All records must be of the same type as that of the table. Empty array if listEncoding is json.
[in]options_Optional parameters. The default value is an empty map.

Definition at line 1001 of file insert_records.h.

Member Data Documentation

◆ data

template<typename T >
std::vector<T> gpudb::InsertRecordsRequest< T >::data

An array of binary-encoded data for the records to be added.

All records must be of the same type as that of the table. Empty array if listEncoding is json.

Definition at line 1021 of file insert_records.h.

◆ options

template<typename T >
std::map<std::string, std::string> gpudb::InsertRecordsRequest< T >::options

Optional parameters.

The default value is an empty map.

Definition at line 1168 of file insert_records.h.

◆ tableName

template<typename T >
std::string gpudb::InsertRecordsRequest< T >::tableName

Name of table to which the records are to be added, in [ schema_name. ]table_name format, using standard name resolution rules.

Must be an existing table.

Definition at line 1014 of file insert_records.h.


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