Constructor
new Type(label, …columns)
    Creates a Type object containing metadata about a GPUdb type.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
label | 
            
            String | A user-defined description string which can be used to differentiate between data with otherwise identical schemas. | |
columns | 
            
            GPUdb.Type.Column | 
                
                
                
                    <repeatable> | 
            
            
            The list of columns that the type comprises. | 
Classes
Members
columns :Array.<GPUdb.Type.Column>
    The list of columns that the type comprises.
    Type:
- Array.<GPUdb.Type.Column>
 
label :String
    A user-defined description string which can be used to differentiate
between data with otherwise identical schemas.
    Type:
- String
 
Methods
(static) from_table(gpudb, table_name, callbackopt) → {Promise}
    Creates a Type object containing metadata about the type stored in the
specified table in GPUdb and returns it via the specified callback function,
or via a promise if no callback function is provided.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
gpudb | 
            
            GPUdb | GPUdb API object. | |
table_name | 
            
            String | The table from which to obtain type metadata. | |
callback | 
            
            GPUdbCallback | 
                
                    <optional> | 
            
            
            The callback function. | 
Returns:
    A promise that will be fulfilled with the type object, if
                   no callback function is provided.
- Type
 - Promise
 
(static) from_type(gpudb, type_id, callbackopt) → {Promise}
    Creates a Type object containing metadata about the specified type in GPUdb
and returns it via the specified callback function, or via a promise if no
callback function is provided.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
gpudb | 
            
            GPUdb | GPUdb API object. | |
type_id | 
            
            String | The type for which to obtain metadata. | |
callback | 
            
            GPUdbCallback | 
                
                    <optional> | 
            
            
            The callback function. | 
Returns:
    A promise that will be fulfilled with the type object, if
                   no callback function is provided.
- Type
 - Promise
 
(static) from_type_info(label, type_schema, properties) → {GPUdb.Type}
    Creates a Type object using data returned from the GPUdb show_table or
show_types endpoints.
    Parameters:
| Name | Type | Description | 
|---|---|---|
label | 
            
            String | A user-defined description string which can be used to differentiate between data with otherwise identical schemas. | 
type_schema | 
            
            String | Object | The Avro record schema for the type. | 
properties | 
            
            Object.<String, Array.<String>> | A map of column names to lists of properties that apply to those columns. | 
Returns:
    The Type object.
- Type
 - GPUdb.Type
 
create(gpudb, callbackopt) → {Promise}
    Creates a new type in GPUdb based on the metadata in the Type object and
returns the GPUdb type ID via the specified callback function, or via a
promise if no callback function is provided, for use in subsequent
operations.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
gpudb | 
            
            GPUdb | GPUdb API object. | |
callback | 
            
            GPUdbCallback | 
                
                    <optional> | 
            
            
            The callback function. | 
Returns:
    A promise that will be fulfilled with the type ID, if no
                   callback function is provided.
- Type
 - Promise
 
generate_schema() → {Object}
    Generates an Avro record schema based on the metadata in the Type object.
Returns:
    The Avro record schema.
- Type
 - Object