Documentation ¶
Index ¶
- func ToJSON(d DataType) (string, error)
- type AliaseDataType
- type ArrayType
- type BinaryType
- type BooleanType
- type ByteType
- type DataType
- type DateType
- type DecimalType
- type DoubleType
- type FloatType
- type IntegerType
- type LongType
- type MapType
- type NullType
- type ShortType
- type StringType
- type StructField
- type StructType
- func (s *StructType) Add(field *StructField) *StructType
- func (s *StructType) Add2(fieldName string, dt DataType) *StructType
- func (s *StructType) Add3(fieldName string, dt DataType, nullable bool) *StructType
- func (s *StructType) FieldNames() []string
- func (s *StructType) Get(fieldName string) (*StructField, error)
- func (s *StructType) GetFields() []*StructField
- func (s *StructType) Length() int
- func (s *StructType) Name() string
- type TimestampType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AliaseDataType ¶
type AliaseDataType interface {
Aliases() []string
}
type BinaryType ¶
type BinaryType struct { }
func (*BinaryType) Name ¶
func (b *BinaryType) Name() string
type BooleanType ¶
type BooleanType struct { }
func (*BooleanType) Name ¶
func (b *BooleanType) Name() string
type DecimalType ¶
type DecimalType struct { Precision int `json:"precision,omitempty"` Scale int `json:"scale,omitempty"` }
func (*DecimalType) JSON ¶
func (d *DecimalType) JSON() string
func (*DecimalType) Name ¶
func (d *DecimalType) Name() string
type DoubleType ¶
type DoubleType struct { }
func (*DoubleType) Name ¶
func (d *DoubleType) Name() string
type IntegerType ¶
type IntegerType struct { }
func (*IntegerType) Aliases ¶
func (i *IntegerType) Aliases() []string
func (*IntegerType) Name ¶
func (i *IntegerType) Name() string
type StringType ¶
type StringType struct { }
func (*StringType) Name ¶
func (s *StringType) Name() string
type StructField ¶
type StructField struct { Name string DataType DataType Nullable bool // a map is used for metadata, be aware of all the numbers are marshalled as float64 // Note: Java version only supports Long(array)/Double(array)/Bool(array)/String(array)/Map type, but we do not check them explicitly. Metadata map[string]interface{} }
func NewStructField ¶
func NewStructField(name string, t DataType, nullable bool) *StructField
type StructType ¶
type StructType struct { Fields []*StructField // contains filtered or unexported fields }
func NewStructType ¶
func NewStructType(fields []*StructField) *StructType
func (*StructType) Add ¶
func (s *StructType) Add(field *StructField) *StructType
func (*StructType) Add2 ¶
func (s *StructType) Add2(fieldName string, dt DataType) *StructType
func (*StructType) Add3 ¶
func (s *StructType) Add3(fieldName string, dt DataType, nullable bool) *StructType
func (*StructType) FieldNames ¶
func (s *StructType) FieldNames() []string
func (*StructType) Get ¶
func (s *StructType) Get(fieldName string) (*StructField, error)
func (*StructType) GetFields ¶
func (s *StructType) GetFields() []*StructField
func (*StructType) Length ¶
func (s *StructType) Length() int
func (*StructType) Name ¶
func (s *StructType) Name() string
type TimestampType ¶
type TimestampType struct { }
func (*TimestampType) Name ¶
func (t *TimestampType) Name() string
Click to show internal directories.
Click to hide internal directories.