Class: Type

GPUdb.Type(label, …columns)

Metadata about a GPUdb type.

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.
Source:

Classes

Column

Members

columns :Array.<GPUdb.Type.Column>

The list of columns that the type comprises.
Type:
Source:

label :String

A user-defined description string which can be used to differentiate between data with otherwise identical schemas.
Type:
  • String
Source:

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.
Source:
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.
Source:
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.
Source:
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.
Source:
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.
Source:
Returns:
The Avro record schema.
Type
Object