◆ createType() [1/4]
| CreateTypeResponse gpudb::GPUdb::createType | ( | const CreateTypeRequest & | request_ | ) | const |
Creates a new type describing the columns of a table.
The type definition is specified 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:
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 possible values for properties), and any data handling, data key, or data replacement properties.
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 primary_key and nullable.
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 column value (or set of values for the key columns, if using a composite 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.
| [in] | request_ | Request object containing the parameters for the operation. |
◆ createType() [2/4]
| CreateTypeResponse & gpudb::GPUdb::createType | ( | const CreateTypeRequest & | request_, |
| CreateTypeResponse & | response_ ) const |
Creates a new type describing the columns of a table.
The type definition is specified 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:
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 possible values for properties), and any data handling, data key, or data replacement properties.
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 primary_key and nullable.
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 column value (or set of values for the key columns, if using a composite 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.
◆ createType() [3/4]
| CreateTypeResponse gpudb::GPUdb::createType | ( | const std::string & | typeDefinition, |
| const std::string & | label, | ||
| const std::map< std::string, std::vector< std::string > > & | properties, | ||
| const std::map< std::string, std::string > & | options ) const |
Creates a new type describing the columns of a table.
The type definition is specified 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:
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 possible values for properties), and any data handling, data key, or data replacement properties.
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 primary_key and nullable.
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 column value (or set of values for the key columns, if using a composite 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.
| [in] | typeDefinition | JSON string defining the columns of the type to be registered, as described above. |
| [in] | label | A user-defined description string which can be used to differentiate between tables and types with otherwise identical schemas. |
| [in] | properties | [DEPRECATED–please use these property values in the typeDefinition directly, as described at the top, instead] Each key-value pair specifies the properties to use for a given column where the key is the column name. All keys used must be relevant column names for the given table. Specifying any property overrides the default properties for that column (which is based on the column’s data type). Valid values are:
|
| [in] | options | Optional parameters.
|
◆ createType() [4/4]
| CreateTypeResponse & gpudb::GPUdb::createType | ( | const std::string & | typeDefinition, |
| const std::string & | label, | ||
| const std::map< std::string, std::vector< std::string > > & | properties, | ||
| const std::map< std::string, std::string > & | options, | ||
| CreateTypeResponse & | response_ ) const |
Creates a new type describing the columns of a table.
The type definition is specified 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:
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 possible values for properties), and any data handling, data key, or data replacement properties.
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 primary_key and nullable.
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 column value (or set of values for the key columns, if using a composite 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.
| [in] | typeDefinition | JSON string defining the columns of the type to be registered, as described above. |
| [in] | label | A user-defined description string which can be used to differentiate between tables and types with otherwise identical schemas. |
| [in] | properties | [DEPRECATED–please use these property values in the typeDefinition directly, as described at the top, instead] Each key-value pair specifies the properties to use for a given column where the key is the column name. All keys used must be relevant column names for the given table. Specifying any property overrides the default properties for that column (which is based on the column’s data type). Valid values are:
|
| [in] | options | Optional parameters.
|
| [out] | response_ | Response object containing the results of the operation. |