Documentation
¶
Index ¶
- Variables
- func Array[V any](valueType Type[V]) *typeArray[V]
- func ArrayAny(valueType Any) *typeArrayAny
- func Decimal(precision uint8, scale uint8) *typeDecimal
- func Eq(a, b Any) bool
- func FixedString(length int) *typeFixedString
- func LowCardinality[V any](valueType Type[V]) *typeLowCardinality[V]
- func LowCardinalityAny(valueType Any) *typeLowCardinalityAny
- func Map[K comparable, V any](keyType Type[K], valueType Type[V]) *typeMap[K, V]
- func MapAny(keyType Any, valueType Any) *typeMapAny
- func Nullable[V any](valueType Type[V]) *typeNullable[V]
- func NullableAny(valueType Any) *typeNullableAny
- func Read[V any](r *FormatReader, tp Type[V]) (V, error)
- func TupleAny(valueTypes ...Any) *typeTupleAny
- func UseBinaryHeader(value bool) useBinaryHeaderType
- func Write[V any](w *FormatWriter, tp Type[V], value V) error
- type Any
- type Column
- type Format
- type FormatOption
- type FormatReader
- type FormatWriter
- type Reader
- type Type
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BinaryTypeNothing = [1]byte{0x00} BinaryTypeUInt8 = [1]byte{0x01} BinaryTypeUInt16 = [1]byte{0x02} BinaryTypeUInt32 = [1]byte{0x03} BinaryTypeUInt64 = [1]byte{0x04} BinaryTypeUInt128 = [1]byte{0x05} BinaryTypeUInt256 = [1]byte{0x06} BinaryTypeInt8 = [1]byte{0x07} BinaryTypeInt16 = [1]byte{0x08} BinaryTypeInt32 = [1]byte{0x09} BinaryTypeInt64 = [1]byte{0x0A} BinaryTypeInt128 = [1]byte{0x0B} BinaryTypeInt256 = [1]byte{0x0C} BinaryTypeFloat32 = [1]byte{0x0D} BinaryTypeFloat64 = [1]byte{0x0E} BinaryTypeDate = [1]byte{0x0F} BinaryTypeDate32 = [1]byte{0x10} BinaryTypeDateTime = [1]byte{0x11} BinaryTypeDateTimeWithTimeZone = [1]byte{0x12} // <var_uint_time_zone_name_size><time_zone_name_data> BinaryTypeDateTime64 = [1]byte{0x13} // <uint8_precision> BinaryTypeDateTime64WithTimeZone = [1]byte{0x14} // <uint8_precision><var_uint_time_zone_name_size><time_zone_name_data> BinaryTypeString = [1]byte{0x15} BinaryTypeFixedString = [1]byte{0x16} // <var_uint_size> BinaryTypeEnum8 = [1]byte{0x17} // <var_uint_number_of_elements><var_uint_name_size_1><name_data_1><int8_value_1>...<var_uint_name_size_N><name_data_N><int8_value_N> BinaryTypeEnum16 = [1]byte{0x18} // <var_uint_number_of_elements><var_uint_name_size_1><name_data_1><int16_little_endian_value_1>...><var_uint_name_size_N><name_data_N><int16_little_endian_value_N> BinaryTypeDecimal32 = [1]byte{0x19} // <uint8_precision><uint8_scale> BinaryTypeDecimal64 = [1]byte{0x1A} // <uint8_precision><uint8_scale> BinaryTypeDecimal128 = [1]byte{0x1B} // <uint8_precision><uint8_scale> BinaryTypeDecimal256 = [1]byte{0x1C} // <uint8_precision><uint8_scale> BinaryTypeUUID = [1]byte{0x1D} BinaryTypeArray = [1]byte{0x1E} // <nested_type_encoding> BinaryTypeTuple = [1]byte{0x1F} // <var_uint_number_of_elements><nested_type_encoding_1>...<nested_type_encoding_N> BinaryTypeTupleNamed = [1]byte{0x20} // <var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N> BinaryTypeSet = [1]byte{0x21} BinaryTypeInterval = [1]byte{0x22} // <interval_kind> (see interval kind binary encoding) BinaryTypeNullable = [1]byte{0x23} // <nested_type_encoding> BinaryTypeFunction = [1]byte{0x24} // <var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N><return_type_encoding> BinaryTypeAggregateFunction = [1]byte{0x25} // <var_uint_version><var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N> (see aggregate function parameter binary encoding) BinaryTypeLowCardinality = [1]byte{0x26} // <nested_type_encoding> BinaryTypeMap = [1]byte{0x27} // <key_type_encoding><value_type_encoding> BinaryTypeIPv4 = [1]byte{0x28} BinaryTypeIPv6 = [1]byte{0x29} BinaryTypeVariant = [1]byte{0x2A} // <var_uint_number_of_variants><variant_type_encoding_1>...<variant_type_encoding_N> BinaryTypeDynamic = [1]byte{0x2B} // <uint8_max_types> BinaryTypeCustom = [1]byte{0x2C} // <var_uint_type_name_size><type_name_data> BinaryTypeBool = [1]byte{0x2D} BinaryTypeSimpleAggregateFunction = [1]byte{0x2E} // <var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N> (see aggregate function parameter binary encoding) BinaryTypeNested = [1]byte{0x2F} // <var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N> BinaryTypeJSON = [1]byte{0x30} // <uint8_serialization_version><var_int_max_dynamic_paths><uint8_max_dynamic_types><var_uint_number_of_typed_paths><var_uint_path_name_size_1><path_name_data_1><encoded_type_1>...<var_uint_number_of_skip_paths><var_uint_skip_path_size_1><skip_path_data_1>...<var_uint_number_of_skip_path_regexps><var_uint_skip_path_regexp_size_1><skip_path_data_regexp_1>... BinaryTypeBFloat16 = [1]byte{0x31} BinaryTypeTime = [1]byte{0x32} BinaryTypeTime64 = [1]byte{0x34} // <uint8_precision> )
View Source
var ErrNotImplemented = errors.New("not implemented")
Functions ¶
func FixedString ¶
func FixedString(length int) *typeFixedString
func LowCardinality ¶
func LowCardinalityAny ¶
func LowCardinalityAny(valueType Any) *typeLowCardinalityAny
func NullableAny ¶
func NullableAny(valueType Any) *typeNullableAny
func UseBinaryHeader ¶
func UseBinaryHeader(value bool) useBinaryHeaderType
Types ¶
type Any ¶
type Any interface {
String() string
Binary() []byte
ReadAny(r Reader) (any, error)
WriteAny(w Writer, v any) error
}
func DecodeBinaryType ¶
DecodeBinaryType decodes a binary type from the given reader.
type FormatOption ¶
type FormatOption interface {
// contains filtered or unexported methods
}
type FormatReader ¶
type FormatReader struct {
// contains filtered or unexported fields
}
func NewFormatReader ¶
func NewFormatReader(wrap io.Reader, opts ...FormatOption) *FormatReader
func (*FormatReader) Err ¶
func (r *FormatReader) Err() error
func (*FormatReader) Next ¶
func (r *FormatReader) Next() bool
func (*FormatReader) ReadAny ¶
func (r *FormatReader) ReadAny() (any, error)
type FormatWriter ¶
type FormatWriter struct {
// contains filtered or unexported fields
}
func NewFormatWriter ¶
func NewFormatWriter(wrap io.Writer, opts ...FormatOption) *FormatWriter
func (*FormatWriter) Err ¶
func (w *FormatWriter) Err() error
func (*FormatWriter) WriteAny ¶
func (w *FormatWriter) WriteAny(values ...any) error
func (*FormatWriter) WriteHeader ¶
func (w *FormatWriter) WriteHeader() error
type Reader ¶
type Reader interface {
io.Reader
io.ByteScanner
// contains filtered or unexported methods
}
Source Files
¶
- array.go
- array_any.go
- binary_type.go
- bool.go
- column.go
- date.go
- datetime.go
- decimal.go
- fixed_string.go
- float32.go
- float64.go
- format.go
- format_options.go
- format_reader.go
- format_writer.go
- int16.go
- int32.go
- int64.go
- int8.go
- interface.go
- low_cardinality.go
- low_cardinality_any.go
- map.go
- map_any.go
- nothing.go
- nullable.go
- nullable_any.go
- reader.go
- string.go
- swap64.go
- tuple_any.go
- type.go
- uint16.go
- uint32.go
- uint64.go
- uint8.go
- uuid.go
- uvarint.go
- writer.go
Click to show internal directories.
Click to hide internal directories.