Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v4.99.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 10 Imported by: 141

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtensionTypes = struct {
	UUID arrow.ExtensionType
	Inet arrow.ExtensionType
	MAC  arrow.ExtensionType
	JSON arrow.ExtensionType
}{
	UUID: NewUUIDType(),
	Inet: NewInetType(),
	MAC:  NewMACType(),
	JSON: NewJSONType(),
}
View Source
var UUID = NewUUIDType()

Functions

func RegisterAllExtensions

func RegisterAllExtensions() error

func UnregisterAllExtensions

func UnregisterAllExtensions() error

Types

type InetArray

type InetArray struct {
	array.ExtensionArrayBase
}

InetArray is a simple array which is a FixedSizeBinary(16)

func (*InetArray) GetOneForMarshal

func (a *InetArray) GetOneForMarshal(i int) any

func (*InetArray) MarshalJSON

func (a *InetArray) MarshalJSON() ([]byte, error)

func (*InetArray) String

func (a *InetArray) String() string

func (*InetArray) Value

func (a *InetArray) Value(i int) *net.IPNet

func (*InetArray) ValueStr

func (a *InetArray) ValueStr(i int) string

type InetBuilder

type InetBuilder struct {
	*array.ExtensionBuilder
}

func NewInetBuilder

func NewInetBuilder(mem memory.Allocator) *InetBuilder

func (*InetBuilder) Append

func (b *InetBuilder) Append(v *net.IPNet)

func (*InetBuilder) AppendValueFromString

func (b *InetBuilder) AppendValueFromString(s string) error

func (*InetBuilder) AppendValues

func (b *InetBuilder) AppendValues(v []*net.IPNet, valid []bool)

func (*InetBuilder) NewInetArray

func (b *InetBuilder) NewInetArray() *InetArray

func (*InetBuilder) Unmarshal

func (b *InetBuilder) Unmarshal(dec *json.Decoder) error

func (*InetBuilder) UnmarshalJSON

func (b *InetBuilder) UnmarshalJSON(data []byte) error

func (*InetBuilder) UnmarshalOne

func (b *InetBuilder) UnmarshalOne(dec *json.Decoder) error

func (*InetBuilder) UnsafeAppend

func (b *InetBuilder) UnsafeAppend(v *net.IPNet)

type InetType

type InetType struct {
	arrow.ExtensionBase
}

InetType is a simple extension type that represents a BinaryType to be used for representing IP Addresses and CIDRs

func NewInetType

func NewInetType() *InetType

NewInetType is a convenience function to create an instance of InetType with the correct storage type

func (*InetType) ArrayType

func (*InetType) ArrayType() reflect.Type

ArrayType returns TypeOf(InetArray{}) for constructing Inet arrays

func (*InetType) Deserialize

func (*InetType) Deserialize(storageType arrow.DataType, data string) (arrow.ExtensionType, error)

Deserialize expects storageType to be BinaryType and the data to be "inet-serialized" in order to correctly create a InetType for testing deserialize.

func (*InetType) ExtensionEquals

func (u *InetType) ExtensionEquals(other arrow.ExtensionType) bool

ExtensionEquals returns true if both extensions have the same name

func (*InetType) ExtensionName

func (*InetType) ExtensionName() string

func (*InetType) NewBuilder

func (*InetType) NewBuilder(mem memory.Allocator) array.Builder

func (*InetType) Serialize

func (*InetType) Serialize() string

Serialize returns "inet-serialized" for testing proper metadata passing

func (*InetType) String

func (*InetType) String() string

type JSONArray

type JSONArray struct {
	array.ExtensionArrayBase
}

JSONArray is a simple array which is a Binary

func (*JSONArray) GetOneForMarshal

func (a *JSONArray) GetOneForMarshal(i int) any

func (*JSONArray) MarshalJSON

func (a *JSONArray) MarshalJSON() ([]byte, error)

func (*JSONArray) String

func (a *JSONArray) String() string

func (*JSONArray) Value

func (a *JSONArray) Value(i int) any

func (*JSONArray) ValueStr

func (a *JSONArray) ValueStr(i int) string

type JSONBuilder

type JSONBuilder struct {
	*array.ExtensionBuilder
}

func NewJSONBuilder

func NewJSONBuilder(mem memory.Allocator) *JSONBuilder

func (*JSONBuilder) Append

func (b *JSONBuilder) Append(v any)

func (*JSONBuilder) AppendBytes

func (b *JSONBuilder) AppendBytes(v []byte)

func (*JSONBuilder) AppendValueFromString

func (b *JSONBuilder) AppendValueFromString(s string) error

func (*JSONBuilder) AppendValues

func (b *JSONBuilder) AppendValues(v []any, valid []bool)

func (*JSONBuilder) NewJSONArray

func (b *JSONBuilder) NewJSONArray() *JSONArray

func (*JSONBuilder) Unmarshal

func (b *JSONBuilder) Unmarshal(dec *json.Decoder) error

func (*JSONBuilder) UnmarshalJSON

func (b *JSONBuilder) UnmarshalJSON(data []byte) error

func (*JSONBuilder) UnmarshalOne

func (b *JSONBuilder) UnmarshalOne(dec *json.Decoder) error

func (*JSONBuilder) UnsafeAppend

func (b *JSONBuilder) UnsafeAppend(v any)

type JSONType

type JSONType struct {
	arrow.ExtensionBase
}

JSONType is a simple extension type that represents a BinaryType to be used for representing JSONs

func NewJSONType

func NewJSONType() *JSONType

NewJSONType is a convenience function to create an instance of JSONType with the correct storage type

func (*JSONType) ArrayType

func (*JSONType) ArrayType() reflect.Type

ArrayType returns TypeOf(JSONArray{}) for constructing JSON arrays

func (*JSONType) Deserialize

func (*JSONType) Deserialize(storageType arrow.DataType, data string) (arrow.ExtensionType, error)

Deserialize expects storageType to be BinaryBuilder and the data to be "json-serialized" in order to correctly create a JSONType for testing deserialize.

func (*JSONType) ExtensionEquals

func (e *JSONType) ExtensionEquals(other arrow.ExtensionType) bool

ExtensionEquals returns true if both extensions have the same name

func (*JSONType) ExtensionName

func (*JSONType) ExtensionName() string

func (*JSONType) MarshalJSON

func (e *JSONType) MarshalJSON() ([]byte, error)

func (*JSONType) NewBuilder

func (*JSONType) NewBuilder(mem memory.Allocator) array.Builder

func (*JSONType) Serialize

func (*JSONType) Serialize() string

Serialize returns "json-serialized" for testing proper metadata passing

func (*JSONType) String

func (*JSONType) String() string

type MACArray

type MACArray struct {
	array.ExtensionArrayBase
}

MACArray is a simple array which is a wrapper around a BinaryArray

func (*MACArray) GetOneForMarshal

func (a *MACArray) GetOneForMarshal(i int) any

func (*MACArray) MarshalJSON

func (a *MACArray) MarshalJSON() ([]byte, error)

func (*MACArray) String

func (a *MACArray) String() string

func (*MACArray) Value

func (a *MACArray) Value(i int) net.HardwareAddr

func (*MACArray) ValueStr

func (a *MACArray) ValueStr(i int) string

type MACBuilder

type MACBuilder struct {
	*array.ExtensionBuilder
}

func NewMACBuilder

func NewMACBuilder(mem memory.Allocator) *MACBuilder

func (*MACBuilder) Append

func (b *MACBuilder) Append(v net.HardwareAddr)

func (*MACBuilder) AppendValueFromString

func (b *MACBuilder) AppendValueFromString(s string) error

func (*MACBuilder) AppendValues

func (b *MACBuilder) AppendValues(v []net.HardwareAddr, valid []bool)

func (*MACBuilder) NewMACArray

func (b *MACBuilder) NewMACArray() *MACArray

func (*MACBuilder) Unmarshal

func (b *MACBuilder) Unmarshal(dec *json.Decoder) error

func (*MACBuilder) UnmarshalJSON

func (b *MACBuilder) UnmarshalJSON(data []byte) error

func (*MACBuilder) UnmarshalOne

func (b *MACBuilder) UnmarshalOne(dec *json.Decoder) error

func (*MACBuilder) UnsafeAppend

func (b *MACBuilder) UnsafeAppend(v net.HardwareAddr)

type MACType

type MACType struct {
	arrow.ExtensionBase
}

MACType is a simple extension type that represents a BinaryType to be used for representing MAC addresses.

func NewMACType

func NewMACType() *MACType

NewMACType is a convenience function to create an instance of MACType with the correct storage type

func (*MACType) ArrayType

func (*MACType) ArrayType() reflect.Type

ArrayType returns TypeOf(MACArray{}) for constructing MAC arrays

func (*MACType) Deserialize

func (*MACType) Deserialize(storageType arrow.DataType, data string) (arrow.ExtensionType, error)

Deserialize expects storageType to be FixedSizeBinaryType{ByteWidth: 16} and the data to be "MAC-serialized" in order to correctly create a MACType for testing deserialize.

func (*MACType) ExtensionEquals

func (u *MACType) ExtensionEquals(other arrow.ExtensionType) bool

ExtensionEquals returns true if both extensions have the same name

func (*MACType) ExtensionName

func (*MACType) ExtensionName() string

func (*MACType) NewBuilder

func (*MACType) NewBuilder(mem memory.Allocator) array.Builder

func (*MACType) Serialize

func (*MACType) Serialize() string

Serialize returns "mac-serialized" for testing proper metadata passing

func (*MACType) String

func (*MACType) String() string

type UUIDArray

type UUIDArray struct {
	array.ExtensionArrayBase
}

UUIDArray is a simple array which is a FixedSizeBinary(16)

func (*UUIDArray) GetOneForMarshal

func (a *UUIDArray) GetOneForMarshal(i int) any

func (*UUIDArray) MarshalJSON

func (a *UUIDArray) MarshalJSON() ([]byte, error)

func (*UUIDArray) String

func (a *UUIDArray) String() string

func (*UUIDArray) Value

func (a *UUIDArray) Value(i int) uuid.UUID

func (*UUIDArray) ValueStr

func (a *UUIDArray) ValueStr(i int) string

type UUIDBuilder

type UUIDBuilder struct {
	*array.ExtensionBuilder
}

func NewUUIDBuilder

func NewUUIDBuilder(mem memory.Allocator) *UUIDBuilder

func (*UUIDBuilder) Append

func (b *UUIDBuilder) Append(v uuid.UUID)

func (*UUIDBuilder) AppendValueFromString

func (b *UUIDBuilder) AppendValueFromString(s string) error

func (*UUIDBuilder) AppendValues

func (b *UUIDBuilder) AppendValues(v []uuid.UUID, valid []bool)

func (*UUIDBuilder) NewUUIDArray

func (b *UUIDBuilder) NewUUIDArray() *UUIDArray

func (*UUIDBuilder) Unmarshal

func (b *UUIDBuilder) Unmarshal(dec *json.Decoder) error

func (*UUIDBuilder) UnmarshalJSON

func (b *UUIDBuilder) UnmarshalJSON(data []byte) error

func (*UUIDBuilder) UnmarshalOne

func (b *UUIDBuilder) UnmarshalOne(dec *json.Decoder) error

func (*UUIDBuilder) UnsafeAppend

func (b *UUIDBuilder) UnsafeAppend(v uuid.UUID)

type UUIDType

type UUIDType struct {
	arrow.ExtensionBase
}

UUIDType is a simple extension type that represents a FixedSizeBinary(16) to be used for representing UUIDs

func NewUUIDType

func NewUUIDType() *UUIDType

NewUUIDType is a convenience function to create an instance of UUIDType with the correct storage type

func (*UUIDType) ArrayType

func (*UUIDType) ArrayType() reflect.Type

ArrayType returns TypeOf(UUIDArray{}) for constructing UUID arrays

func (*UUIDType) Deserialize

func (*UUIDType) Deserialize(storageType arrow.DataType, data string) (arrow.ExtensionType, error)

Deserialize expects storageType to be FixedSizeBinaryType{ByteWidth: 16} and the data to be "uuid-serialized" in order to correctly create a UUIDType for testing deserialize.

func (*UUIDType) ExtensionEquals

func (e *UUIDType) ExtensionEquals(other arrow.ExtensionType) bool

ExtensionEquals returns true if both extensions have the same name

func (*UUIDType) ExtensionName

func (*UUIDType) ExtensionName() string

func (*UUIDType) MarshalJSON

func (e *UUIDType) MarshalJSON() ([]byte, error)

func (*UUIDType) NewBuilder

func (*UUIDType) NewBuilder(mem memory.Allocator) array.Builder

func (*UUIDType) Serialize

func (*UUIDType) Serialize() string

Serialize returns "uuid-serialized" for testing proper metadata passing

func (*UUIDType) String

func (*UUIDType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL