Class: StructField

eclairjs/sql/types. StructField

A field inside a StructType.

Constructor

new StructField(name, dataType, nullable, metadata)

Parameters:
Name Type Description
name string The name of this field.
dataType module:eclairjs/sql/types.DataType The data type of this field.
nullable boolean Indicates if values of this field can be null values.
metadata module:eclairjs/sql/types.Metadata The metadata of this field. The metadata should be preserved during transformation if the content of the column is not modified, e.g, in selection.
Source:

Methods

dataType() → {module:eclairjs/sql/types.DataType}

Source:
Returns:
Type
module:eclairjs/sql/types.DataType

getComment() → {string}

Return the comment of this StructField.
Source:
Returns:
Type
string

metadata() → {module:eclairjs/sql/types.Metadata}

Source:
Returns:
Type
module:eclairjs/sql/types.Metadata

name() → {string}

Source:
Returns:
Type
string

nullable() → {boolean}

Source:
Returns:
Type
boolean

toJSON() → {string}

Source:
Returns:
Type
string

withComment(comment) → {module:eclairjs/sql/types.StructField}

Updates the StructField with a new comment value.
Parameters:
Name Type Description
comment string
Source:
Returns:
Type
module:eclairjs/sql/types.StructField