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

A set of output parameters for createType(const CreateTypeRequest&) const. More...

#include <gpudb/protocol/create_type.h>

Public Member Functions

 CreateTypeResponse ()
 Constructs a CreateTypeResponse object with default parameter values. More...
 

Public Attributes

std::string typeId
 
std::string typeDefinition
 
std::string label
 
std::map< std::string, std::vector< std::string > > properties
 

Detailed Description

A set of output parameters for createType(const CreateTypeRequest&) const.

Creates a new type describing the layout or schema of a table. The type definition is a JSON string describing the fields (i.e. columns) of the type. Each field consists of a name and a data type. Supported data types are: double, float, int, long, string, and bytes. In addition one or more properties can be specified for each column which customize the memory usage and query availability of that column. Note that some properties are mutually exclusive–i.e. they cannot be specified for any given column simultaneously. One example of mutually exclusive properties are data and store_only.

A single primary key and/or single shard key can be set across one or more columns. If a primary key is specified, then a uniqueness constraint is enforced, in that only a single object can exist with a given primary key. When inserting data into a table with a primary key, depending on the parameters in the request, incoming objects with primary key values that match existing objects will either overwrite (i.e. update) the existing object or will be skipped and not added into the set.

Example of a type definition with some of the parameters::

{"type":"record", "name":"point", "fields":[{"name":"msg_id","type":"string"}, {"name":"x","type":"double"}, {"name":"y","type":"double"}, {"name":"TIMESTAMP","type":"double"}, {"name":"source","type":"string"}, {"name":"group_id","type":"string"}, {"name":"OBJECT_ID","type":"string"}] }

Properties::

{"group_id":["store_only"], "msg_id":["store_only","text_search"] }

Definition at line 384 of file create_type.h.

Constructor & Destructor Documentation

◆ CreateTypeResponse()

gpudb::CreateTypeResponse::CreateTypeResponse ( )
inline

Constructs a CreateTypeResponse object with default parameter values.

Definition at line 391 of file create_type.h.

Member Data Documentation

◆ label

std::string gpudb::CreateTypeResponse::label

Definition at line 401 of file create_type.h.

◆ properties

std::map<std::string, std::vector<std::string> > gpudb::CreateTypeResponse::properties

Definition at line 402 of file create_type.h.

◆ typeDefinition

std::string gpudb::CreateTypeResponse::typeDefinition

Definition at line 400 of file create_type.h.

◆ typeId

std::string gpudb::CreateTypeResponse::typeId

Definition at line 399 of file create_type.h.


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