Class: Type
Constructor
new Type(label, …columns)
| 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>
- Array.<GPUdb.Type.Column>
- ,
label :String
- String
- ,
Methods
create(gpudb, callbackopt) → String
If a callback function is provided, the type will be created asynchronously, and the result (either a type ID or an error) will be passed to the callback function upon completion.
If a callback function is not provided, the type will be created synchronously and the type ID returned directly, and an exception will be thrown if an error occurs.
| Name | Type | Attributes | Description |
|---|---|---|---|
gpudb | GPUdb | GPUdb API object. | |
callback | GPUdbCallback | <optional> | The callback function, if asynchronous operation is desired. |
- ,
generate_schema() → Object
- ,
(static) from_table(gpudb, table_name, callbackopt) → GPUdb.Type
If a callback function is provided, the metadata will be obtained asynchronously, and the result (either a Type object or an error) will be passed to the callback function upon completion.
If a callback function is not provided, the metadata will be obtained synchronously and the Type object returned directly, and an exception will be thrown if an error occurs.
| 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, if asynchronous operation is desired. |
- ,
(static) from_type(gpudb, type_id, callbackopt) → GPUdb.Type
If a callback function is provided, the metadata will be obtained asynchronously, and the result (either a Type object or an error) will be passed to the callback function upon completion.
If a callback function is not provided, the metadata will be obtained synchronously and the Type object returned directly, and an exception will be thrown if an error occurs.
| 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, if asynchronous operation is desired. |
- ,
(static) from_type_info(label, type_schema, properties) → GPUdb.Type
| 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. |
- ,