GPUdb C++ API  Version 7.2.3.0
gpudb::CreateTableRequest Struct Reference

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

#include <gpudb/protocol/create_table.h>

Public Member Functions

 CreateTableRequest ()
 Constructs a CreateTableRequest object with default parameters. More...
 
 CreateTableRequest (const std::string &tableName_, const std::string &typeId_, const std::map< std::string, std::string > &options_)
 Constructs a CreateTableRequest object with the specified parameters. More...
 

Public Attributes

std::string tableName
 Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria. More...
 
std::string typeId
 The type for the table, specified as either an existing table's numerical type ID (as returned by GPUdb::createType) or a type definition (as described above). More...
 
std::map< std::string, std::string > options
 Optional parameters. More...
 

Detailed Description

A set of parameters for GPUdb::createTable.

Creates a new table with the given type (definition of columns). The type is specified in typeId as either a numerical type ID (as returned by GPUdb::createType) or as a list of columns, each specified as a list of the column name, data type, and any column attributes.

Example of a type definition with some parameters:

[
["id", "int8", "primary_key"],
["dept_id", "int8", "primary_key", "shard_key"],
["manager_id", "int8", "nullable"],
["first_name", "char32"],
["last_name", "char64"],
["salary", "decimal"],
["hire_date", "date"]
]

Each column definition consists of the column name (which should meet the standard column naming criteria), the column's specific type (int, long, float, double, string, bytes, or any of the properties map values from GPUdb::createType), and any data handling, data key, or data replacement properties.

A table may optionally be designated to use a replicated distribution scheme, or be assigned: foreign keys to other tables, a partitioning scheme, and/or a tier strategy.

Definition at line 59 of file create_table.h.

Constructor & Destructor Documentation

◆ CreateTableRequest() [1/2]

gpudb::CreateTableRequest::CreateTableRequest ( )
inline

Constructs a CreateTableRequest object with default parameters.

Definition at line 64 of file create_table.h.

◆ CreateTableRequest() [2/2]

gpudb::CreateTableRequest::CreateTableRequest ( const std::string &  tableName_,
const std::string &  typeId_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a CreateTableRequest object with the specified parameters.

Parameters
[in]tableName_Name of the table to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. Error for requests with existing table of the same name and type ID may be suppressed by using the no_error_if_exists option.
[in]typeId_The type for the table, specified as either an existing table's numerical type ID (as returned by GPUdb::createType) or a type definition (as described above).
[in]options_Optional parameters. The default value is an empty map.

Definition at line 423 of file create_table.h.

Member Data Documentation

◆ options

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

Optional parameters.

The default value is an empty map.

Definition at line 685 of file create_table.h.

◆ tableName

std::string gpudb::CreateTableRequest::tableName

Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria.

Error for requests with existing table of the same name and type ID may be suppressed by using the no_error_if_exists option.

Definition at line 441 of file create_table.h.

◆ typeId

std::string gpudb::CreateTableRequest::typeId

The type for the table, specified as either an existing table's numerical type ID (as returned by GPUdb::createType) or a type definition (as described above).

Definition at line 449 of file create_table.h.


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