Documentation ¶
Overview ¶
Package proto implements ClickHouse wire protocol.
Index ¶
- Constants
- func CardinalityKeyStrings() []string
- func ClientCodeStrings() []string
- func ClientQueryKindStrings() []string
- func CompressionStrings() []string
- func ErrorStrings() []string
- func FeatureStrings() []string
- func InterfaceStrings() []string
- func IntervalScaleStrings() []string
- func ProfileEventTypeStrings() []string
- func Reset(columns ...Resettable)
- func ServerCodeStrings() []string
- func StageStrings() []string
- type Arrayable
- type AwareDecoder
- type AwareEncoder
- type Block
- func (b *Block) DecodeBlock(r *Reader, version int, target Result) error
- func (b *Block) DecodeRawBlock(r *Reader, version int, target Result) error
- func (b Block) EncodeAware(buf *Buffer, version int)
- func (b Block) EncodeBlock(buf *Buffer, version int, input []InputColumn) error
- func (b Block) EncodeRawBlock(buf *Buffer, version int, input []InputColumn) error
- func (b *Block) End() bool
- func (b Block) WriteBlock(w *Writer, version int, input []InputColumn) error
- type BlockInfo
- type Buffer
- func (b *Buffer) Encode(e Encoder)
- func (b *Buffer) EncodeAware(e AwareEncoder, version int)
- func (b *Buffer) Ensure(n int)
- func (b *Buffer) PutBool(v bool)
- func (b *Buffer) PutByte(x byte)
- func (b *Buffer) PutFloat32(v float32)
- func (b *Buffer) PutFloat64(v float64)
- func (b *Buffer) PutInt(x int)
- func (b *Buffer) PutInt128(x Int128)
- func (b *Buffer) PutInt16(v int16)
- func (b *Buffer) PutInt32(x int32)
- func (b *Buffer) PutInt64(x int64)
- func (b *Buffer) PutInt8(v int8)
- func (b *Buffer) PutLen(x int)
- func (b *Buffer) PutRaw(v []byte)
- func (b *Buffer) PutString(s string)
- func (b *Buffer) PutUInt128(x UInt128)
- func (b *Buffer) PutUInt16(x uint16)
- func (b *Buffer) PutUInt32(x uint32)
- func (b *Buffer) PutUInt64(x uint64)
- func (b *Buffer) PutUInt8(x uint8)
- func (b *Buffer) PutUVarInt(x uint64)
- func (b *Buffer) Read(p []byte) (n int, err error)
- func (b *Buffer) Reader() *Reader
- func (b *Buffer) Reset()
- type CardinalityKey
- type ClientCode
- type ClientData
- type ClientHello
- type ClientInfo
- type ClientQueryKind
- type ColArr
- func NewArrDate() *ColArr[time.Time]
- func NewArrDate32() *ColArr[time.Time]
- func NewArrDateTime() *ColArr[time.Time]
- func NewArrDecimal128() *ColArr[Decimal128]
- func NewArrDecimal256() *ColArr[Decimal256]
- func NewArrDecimal32() *ColArr[Decimal32]
- func NewArrDecimal64() *ColArr[Decimal64]
- func NewArrEnum16() *ColArr[Enum16]
- func NewArrEnum8() *ColArr[Enum8]
- func NewArrFixedStr128() *ColArr[[128]byte]
- func NewArrFixedStr16() *ColArr[[16]byte]
- func NewArrFixedStr256() *ColArr[[256]byte]
- func NewArrFixedStr32() *ColArr[[32]byte]
- func NewArrFixedStr512() *ColArr[[512]byte]
- func NewArrFixedStr64() *ColArr[[64]byte]
- func NewArrFixedStr8() *ColArr[[8]byte]
- func NewArrFloat32() *ColArr[float32]
- func NewArrFloat64() *ColArr[float64]
- func NewArrIPv4() *ColArr[IPv4]
- func NewArrIPv6() *ColArr[IPv6]
- func NewArrInt128() *ColArr[Int128]
- func NewArrInt16() *ColArr[int16]
- func NewArrInt256() *ColArr[Int256]
- func NewArrInt32() *ColArr[int32]
- func NewArrInt64() *ColArr[int64]
- func NewArrInt8() *ColArr[int8]
- func NewArrUInt128() *ColArr[UInt128]
- func NewArrUInt16() *ColArr[uint16]
- func NewArrUInt256() *ColArr[UInt256]
- func NewArrUInt32() *ColArr[uint32]
- func NewArrUInt64() *ColArr[uint64]
- func NewArrUInt8() *ColArr[uint8]
- func NewArray[T any](c ColumnOf[T]) *ColArr[T]
- func (c *ColArr[T]) Append(v []T)
- func (c *ColArr[T]) AppendArr(vs [][]T)
- func (c *ColArr[T]) DecodeColumn(r *Reader, rows int) error
- func (c *ColArr[T]) DecodeState(r *Reader) error
- func (c ColArr[T]) EncodeColumn(b *Buffer)
- func (c *ColArr[T]) EncodeState(b *Buffer)
- func (c *ColArr[T]) Infer(t ColumnType) error
- func (c *ColArr[T]) Prepare() error
- func (c *ColArr[T]) Reset()
- func (c *ColArr[T]) Result(column string) ResultColumn
- func (c *ColArr[T]) Results(column string) Results
- func (c ColArr[T]) Row(i int) []T
- func (c ColArr[T]) RowAppend(i int, target []T) []T
- func (c ColArr[T]) RowRange(i int) iter.Seq[T]
- func (c ColArr[T]) Rows() int
- func (c ColArr[T]) Type() ColumnType
- func (c ColArr[T]) WriteColumn(w *Writer)
- type ColAuto
- type ColBool
- func (c *ColBool) Append(v bool)
- func (c *ColBool) AppendArr(vs []bool)
- func (c *ColBool) Array() *ColArr[bool]
- func (c *ColBool) DecodeColumn(r *Reader, rows int) error
- func (c ColBool) EncodeColumn(b *Buffer)
- func (c *ColBool) Nullable() *ColNullable[bool]
- func (c *ColBool) Reset()
- func (c ColBool) Row(i int) bool
- func (c ColBool) Rows() int
- func (ColBool) Type() ColumnType
- func (c ColBool) WriteColumn(w *Writer)
- type ColBytes
- type ColDate
- func (c *ColDate) Append(v time.Time)
- func (c *ColDate) AppendArr(vs []time.Time)
- func (c *ColDate) Array() *ColArr[time.Time]
- func (c *ColDate) DecodeColumn(r *Reader, rows int) error
- func (c ColDate) EncodeColumn(b *Buffer)
- func (c *ColDate) LowCardinality() *ColLowCardinality[time.Time]
- func (c *ColDate) Nullable() *ColNullable[time.Time]
- func (c *ColDate) Reset()
- func (c ColDate) Row(i int) time.Time
- func (c ColDate) Rows() int
- func (ColDate) Type() ColumnType
- func (c ColDate) WriteColumn(w *Writer)
- type ColDate32
- func (c *ColDate32) Append(v time.Time)
- func (c *ColDate32) AppendArr(vs []time.Time)
- func (c *ColDate32) Array() *ColArr[time.Time]
- func (c *ColDate32) DecodeColumn(r *Reader, rows int) error
- func (c ColDate32) EncodeColumn(b *Buffer)
- func (c *ColDate32) LowCardinality() *ColLowCardinality[time.Time]
- func (c *ColDate32) Nullable() *ColNullable[time.Time]
- func (c *ColDate32) Reset()
- func (c ColDate32) Row(i int) time.Time
- func (c ColDate32) Rows() int
- func (ColDate32) Type() ColumnType
- func (c ColDate32) WriteColumn(w *Writer)
- type ColDateTime
- func (c *ColDateTime) Append(v time.Time)
- func (c *ColDateTime) AppendArr(vs []time.Time)
- func (c *ColDateTime) AppendRaw(v DateTime)
- func (c *ColDateTime) Array() *ColArr[time.Time]
- func (c *ColDateTime) DecodeColumn(r *Reader, rows int) error
- func (c ColDateTime) EncodeColumn(b *Buffer)
- func (c *ColDateTime) Infer(t ColumnType) error
- func (c *ColDateTime) LowCardinality() *ColLowCardinality[time.Time]
- func (c *ColDateTime) Nullable() *ColNullable[time.Time]
- func (c *ColDateTime) Reset()
- func (c ColDateTime) Row(i int) time.Time
- func (c ColDateTime) Rows() int
- func (c ColDateTime) Type() ColumnType
- func (c ColDateTime) WriteColumn(w *Writer)
- type ColDateTime64
- func (c *ColDateTime64) Append(v time.Time)
- func (c *ColDateTime64) AppendArr(v []time.Time)
- func (c *ColDateTime64) AppendRaw(v DateTime64)
- func (c *ColDateTime64) Array() *ColArr[time.Time]
- func (c *ColDateTime64) DecodeColumn(r *Reader, rows int) error
- func (c ColDateTime64) EncodeColumn(b *Buffer)
- func (c *ColDateTime64) Infer(t ColumnType) error
- func (c *ColDateTime64) Nullable() *ColNullable[time.Time]
- func (c ColDateTime64) Raw() *ColDateTime64Raw
- func (c *ColDateTime64) Reset()
- func (c ColDateTime64) Row(i int) time.Time
- func (c ColDateTime64) Rows() int
- func (c ColDateTime64) Type() ColumnType
- func (c *ColDateTime64) WithLocation(loc *time.Location) *ColDateTime64
- func (c *ColDateTime64) WithPrecision(p Precision) *ColDateTime64
- func (c ColDateTime64) WriteColumn(w *Writer)
- type ColDateTime64Raw
- type ColDecimal128
- func (c *ColDecimal128) Append(v Decimal128)
- func (c *ColDecimal128) AppendArr(vs []Decimal128)
- func (c *ColDecimal128) Array() *ColArr[Decimal128]
- func (c *ColDecimal128) DecodeColumn(r *Reader, rows int) error
- func (c ColDecimal128) EncodeColumn(b *Buffer)
- func (c *ColDecimal128) LowCardinality() *ColLowCardinality[Decimal128]
- func (c *ColDecimal128) Nullable() *ColNullable[Decimal128]
- func (c *ColDecimal128) Reset()
- func (c ColDecimal128) Row(i int) Decimal128
- func (c ColDecimal128) Rows() int
- func (ColDecimal128) Type() ColumnType
- func (c ColDecimal128) WriteColumn(w *Writer)
- type ColDecimal256
- func (c *ColDecimal256) Append(v Decimal256)
- func (c *ColDecimal256) AppendArr(vs []Decimal256)
- func (c *ColDecimal256) Array() *ColArr[Decimal256]
- func (c *ColDecimal256) DecodeColumn(r *Reader, rows int) error
- func (c ColDecimal256) EncodeColumn(b *Buffer)
- func (c *ColDecimal256) LowCardinality() *ColLowCardinality[Decimal256]
- func (c *ColDecimal256) Nullable() *ColNullable[Decimal256]
- func (c *ColDecimal256) Reset()
- func (c ColDecimal256) Row(i int) Decimal256
- func (c ColDecimal256) Rows() int
- func (ColDecimal256) Type() ColumnType
- func (c ColDecimal256) WriteColumn(w *Writer)
- type ColDecimal32
- func (c *ColDecimal32) Append(v Decimal32)
- func (c *ColDecimal32) AppendArr(vs []Decimal32)
- func (c *ColDecimal32) Array() *ColArr[Decimal32]
- func (c *ColDecimal32) DecodeColumn(r *Reader, rows int) error
- func (c ColDecimal32) EncodeColumn(b *Buffer)
- func (c *ColDecimal32) LowCardinality() *ColLowCardinality[Decimal32]
- func (c *ColDecimal32) Nullable() *ColNullable[Decimal32]
- func (c *ColDecimal32) Reset()
- func (c ColDecimal32) Row(i int) Decimal32
- func (c ColDecimal32) Rows() int
- func (ColDecimal32) Type() ColumnType
- func (c ColDecimal32) WriteColumn(w *Writer)
- type ColDecimal64
- func (c *ColDecimal64) Append(v Decimal64)
- func (c *ColDecimal64) AppendArr(vs []Decimal64)
- func (c *ColDecimal64) Array() *ColArr[Decimal64]
- func (c *ColDecimal64) DecodeColumn(r *Reader, rows int) error
- func (c ColDecimal64) EncodeColumn(b *Buffer)
- func (c *ColDecimal64) LowCardinality() *ColLowCardinality[Decimal64]
- func (c *ColDecimal64) Nullable() *ColNullable[Decimal64]
- func (c *ColDecimal64) Reset()
- func (c ColDecimal64) Row(i int) Decimal64
- func (c ColDecimal64) Rows() int
- func (ColDecimal64) Type() ColumnType
- func (c ColDecimal64) WriteColumn(w *Writer)
- type ColEnum
- func (e *ColEnum) Append(v string)
- func (e *ColEnum) AppendArr(vs []string)
- func (e *ColEnum) DecodeColumn(r *Reader, rows int) error
- func (e *ColEnum) EncodeColumn(b *Buffer)
- func (e *ColEnum) Infer(t ColumnType) error
- func (e *ColEnum) Prepare() error
- func (e *ColEnum) Reset()
- func (e ColEnum) Row(i int) string
- func (e *ColEnum) Rows() int
- func (e *ColEnum) Type() ColumnType
- func (e *ColEnum) WriteColumn(w *Writer)
- type ColEnum16
- func (c *ColEnum16) Append(v Enum16)
- func (c *ColEnum16) AppendArr(vs []Enum16)
- func (c *ColEnum16) Array() *ColArr[Enum16]
- func (c *ColEnum16) DecodeColumn(r *Reader, rows int) error
- func (c ColEnum16) EncodeColumn(b *Buffer)
- func (c *ColEnum16) LowCardinality() *ColLowCardinality[Enum16]
- func (c *ColEnum16) Nullable() *ColNullable[Enum16]
- func (c *ColEnum16) Reset()
- func (c ColEnum16) Row(i int) Enum16
- func (c ColEnum16) Rows() int
- func (ColEnum16) Type() ColumnType
- func (c ColEnum16) WriteColumn(w *Writer)
- type ColEnum8
- func (c *ColEnum8) Append(v Enum8)
- func (c *ColEnum8) AppendArr(vs []Enum8)
- func (c *ColEnum8) Array() *ColArr[Enum8]
- func (c *ColEnum8) DecodeColumn(r *Reader, rows int) error
- func (c ColEnum8) EncodeColumn(b *Buffer)
- func (c *ColEnum8) LowCardinality() *ColLowCardinality[Enum8]
- func (c *ColEnum8) Nullable() *ColNullable[Enum8]
- func (c *ColEnum8) Reset()
- func (c ColEnum8) Row(i int) Enum8
- func (c ColEnum8) Rows() int
- func (ColEnum8) Type() ColumnType
- func (c ColEnum8) WriteColumn(w *Writer)
- type ColFixedStr
- func (c *ColFixedStr) Append(b []byte)
- func (c *ColFixedStr) AppendArr(vs [][]byte)
- func (c *ColFixedStr) Array() *ColArr[[]byte]
- func (c *ColFixedStr) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr) EncodeColumn(b *Buffer)
- func (c *ColFixedStr) Reset()
- func (c ColFixedStr) Row(i int) []byte
- func (c ColFixedStr) Rows() int
- func (c *ColFixedStr) SetSize(n int)
- func (c ColFixedStr) Type() ColumnType
- func (c ColFixedStr) WriteColumn(w *Writer)
- type ColFixedStr128
- func (c *ColFixedStr128) Append(v [128]byte)
- func (c *ColFixedStr128) AppendArr(vs [][128]byte)
- func (c *ColFixedStr128) Array() *ColArr[[128]byte]
- func (c *ColFixedStr128) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr128) EncodeColumn(b *Buffer)
- func (c *ColFixedStr128) LowCardinality() *ColLowCardinality[[128]byte]
- func (c *ColFixedStr128) Nullable() *ColNullable[[128]byte]
- func (c *ColFixedStr128) Reset()
- func (c ColFixedStr128) Row(i int) [128]byte
- func (c ColFixedStr128) Rows() int
- func (ColFixedStr128) Type() ColumnType
- func (c ColFixedStr128) WriteColumn(w *Writer)
- type ColFixedStr16
- func (c *ColFixedStr16) Append(v [16]byte)
- func (c *ColFixedStr16) AppendArr(vs [][16]byte)
- func (c *ColFixedStr16) Array() *ColArr[[16]byte]
- func (c *ColFixedStr16) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr16) EncodeColumn(b *Buffer)
- func (c *ColFixedStr16) LowCardinality() *ColLowCardinality[[16]byte]
- func (c *ColFixedStr16) Nullable() *ColNullable[[16]byte]
- func (c *ColFixedStr16) Reset()
- func (c ColFixedStr16) Row(i int) [16]byte
- func (c ColFixedStr16) Rows() int
- func (ColFixedStr16) Type() ColumnType
- func (c ColFixedStr16) WriteColumn(w *Writer)
- type ColFixedStr256
- func (c *ColFixedStr256) Append(v [256]byte)
- func (c *ColFixedStr256) AppendArr(vs [][256]byte)
- func (c *ColFixedStr256) Array() *ColArr[[256]byte]
- func (c *ColFixedStr256) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr256) EncodeColumn(b *Buffer)
- func (c *ColFixedStr256) LowCardinality() *ColLowCardinality[[256]byte]
- func (c *ColFixedStr256) Nullable() *ColNullable[[256]byte]
- func (c *ColFixedStr256) Reset()
- func (c ColFixedStr256) Row(i int) [256]byte
- func (c ColFixedStr256) Rows() int
- func (ColFixedStr256) Type() ColumnType
- func (c ColFixedStr256) WriteColumn(w *Writer)
- type ColFixedStr32
- func (c *ColFixedStr32) Append(v [32]byte)
- func (c *ColFixedStr32) AppendArr(vs [][32]byte)
- func (c *ColFixedStr32) Array() *ColArr[[32]byte]
- func (c *ColFixedStr32) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr32) EncodeColumn(b *Buffer)
- func (c *ColFixedStr32) LowCardinality() *ColLowCardinality[[32]byte]
- func (c *ColFixedStr32) Nullable() *ColNullable[[32]byte]
- func (c *ColFixedStr32) Reset()
- func (c ColFixedStr32) Row(i int) [32]byte
- func (c ColFixedStr32) Rows() int
- func (ColFixedStr32) Type() ColumnType
- func (c ColFixedStr32) WriteColumn(w *Writer)
- type ColFixedStr512
- func (c *ColFixedStr512) Append(v [512]byte)
- func (c *ColFixedStr512) AppendArr(vs [][512]byte)
- func (c *ColFixedStr512) Array() *ColArr[[512]byte]
- func (c *ColFixedStr512) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr512) EncodeColumn(b *Buffer)
- func (c *ColFixedStr512) LowCardinality() *ColLowCardinality[[512]byte]
- func (c *ColFixedStr512) Nullable() *ColNullable[[512]byte]
- func (c *ColFixedStr512) Reset()
- func (c ColFixedStr512) Row(i int) [512]byte
- func (c ColFixedStr512) Rows() int
- func (ColFixedStr512) Type() ColumnType
- func (c ColFixedStr512) WriteColumn(w *Writer)
- type ColFixedStr64
- func (c *ColFixedStr64) Append(v [64]byte)
- func (c *ColFixedStr64) AppendArr(vs [][64]byte)
- func (c *ColFixedStr64) Array() *ColArr[[64]byte]
- func (c *ColFixedStr64) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr64) EncodeColumn(b *Buffer)
- func (c *ColFixedStr64) LowCardinality() *ColLowCardinality[[64]byte]
- func (c *ColFixedStr64) Nullable() *ColNullable[[64]byte]
- func (c *ColFixedStr64) Reset()
- func (c ColFixedStr64) Row(i int) [64]byte
- func (c ColFixedStr64) Rows() int
- func (ColFixedStr64) Type() ColumnType
- func (c ColFixedStr64) WriteColumn(w *Writer)
- type ColFixedStr8
- func (c *ColFixedStr8) Append(v [8]byte)
- func (c *ColFixedStr8) AppendArr(vs [][8]byte)
- func (c *ColFixedStr8) Array() *ColArr[[8]byte]
- func (c *ColFixedStr8) DecodeColumn(r *Reader, rows int) error
- func (c ColFixedStr8) EncodeColumn(b *Buffer)
- func (c *ColFixedStr8) LowCardinality() *ColLowCardinality[[8]byte]
- func (c *ColFixedStr8) Nullable() *ColNullable[[8]byte]
- func (c *ColFixedStr8) Reset()
- func (c ColFixedStr8) Row(i int) [8]byte
- func (c ColFixedStr8) Rows() int
- func (ColFixedStr8) Type() ColumnType
- func (c ColFixedStr8) WriteColumn(w *Writer)
- type ColFloat32
- func (c *ColFloat32) Append(v float32)
- func (c *ColFloat32) AppendArr(vs []float32)
- func (c *ColFloat32) Array() *ColArr[float32]
- func (c *ColFloat32) DecodeColumn(r *Reader, rows int) error
- func (c ColFloat32) EncodeColumn(b *Buffer)
- func (c *ColFloat32) LowCardinality() *ColLowCardinality[float32]
- func (c *ColFloat32) Nullable() *ColNullable[float32]
- func (c *ColFloat32) Reset()
- func (c ColFloat32) Row(i int) float32
- func (c ColFloat32) Rows() int
- func (ColFloat32) Type() ColumnType
- func (c ColFloat32) WriteColumn(w *Writer)
- type ColFloat64
- func (c *ColFloat64) Append(v float64)
- func (c *ColFloat64) AppendArr(vs []float64)
- func (c *ColFloat64) Array() *ColArr[float64]
- func (c *ColFloat64) DecodeColumn(r *Reader, rows int) error
- func (c ColFloat64) EncodeColumn(b *Buffer)
- func (c *ColFloat64) LowCardinality() *ColLowCardinality[float64]
- func (c *ColFloat64) Nullable() *ColNullable[float64]
- func (c *ColFloat64) Reset()
- func (c ColFloat64) Row(i int) float64
- func (c ColFloat64) Rows() int
- func (ColFloat64) Type() ColumnType
- func (c ColFloat64) WriteColumn(w *Writer)
- type ColIPv4
- func (c *ColIPv4) Append(v IPv4)
- func (c *ColIPv4) AppendArr(vs []IPv4)
- func (c *ColIPv4) Array() *ColArr[IPv4]
- func (c *ColIPv4) DecodeColumn(r *Reader, rows int) error
- func (c ColIPv4) EncodeColumn(b *Buffer)
- func (c *ColIPv4) LowCardinality() *ColLowCardinality[IPv4]
- func (c *ColIPv4) Nullable() *ColNullable[IPv4]
- func (c *ColIPv4) Reset()
- func (c ColIPv4) Row(i int) IPv4
- func (c ColIPv4) Rows() int
- func (ColIPv4) Type() ColumnType
- func (c ColIPv4) WriteColumn(w *Writer)
- type ColIPv6
- func (c *ColIPv6) Append(v IPv6)
- func (c *ColIPv6) AppendArr(vs []IPv6)
- func (c *ColIPv6) Array() *ColArr[IPv6]
- func (c *ColIPv6) DecodeColumn(r *Reader, rows int) error
- func (c ColIPv6) EncodeColumn(b *Buffer)
- func (c *ColIPv6) LowCardinality() *ColLowCardinality[IPv6]
- func (c *ColIPv6) Nullable() *ColNullable[IPv6]
- func (c *ColIPv6) Reset()
- func (c ColIPv6) Row(i int) IPv6
- func (c ColIPv6) Rows() int
- func (ColIPv6) Type() ColumnType
- func (c ColIPv6) WriteColumn(w *Writer)
- type ColInfo
- type ColInfoInput
- type ColInput
- type ColInt128
- func (c *ColInt128) Append(v Int128)
- func (c *ColInt128) AppendArr(vs []Int128)
- func (c *ColInt128) Array() *ColArr[Int128]
- func (c *ColInt128) DecodeColumn(r *Reader, rows int) error
- func (c ColInt128) EncodeColumn(b *Buffer)
- func (c *ColInt128) LowCardinality() *ColLowCardinality[Int128]
- func (c *ColInt128) Nullable() *ColNullable[Int128]
- func (c *ColInt128) Reset()
- func (c ColInt128) Row(i int) Int128
- func (c ColInt128) Rows() int
- func (ColInt128) Type() ColumnType
- func (c ColInt128) WriteColumn(w *Writer)
- type ColInt16
- func (c *ColInt16) Append(v int16)
- func (c *ColInt16) AppendArr(vs []int16)
- func (c *ColInt16) Array() *ColArr[int16]
- func (c *ColInt16) DecodeColumn(r *Reader, rows int) error
- func (c ColInt16) EncodeColumn(b *Buffer)
- func (c *ColInt16) LowCardinality() *ColLowCardinality[int16]
- func (c *ColInt16) Nullable() *ColNullable[int16]
- func (c *ColInt16) Reset()
- func (c ColInt16) Row(i int) int16
- func (c ColInt16) Rows() int
- func (ColInt16) Type() ColumnType
- func (c ColInt16) WriteColumn(w *Writer)
- type ColInt256
- func (c *ColInt256) Append(v Int256)
- func (c *ColInt256) AppendArr(vs []Int256)
- func (c *ColInt256) Array() *ColArr[Int256]
- func (c *ColInt256) DecodeColumn(r *Reader, rows int) error
- func (c ColInt256) EncodeColumn(b *Buffer)
- func (c *ColInt256) LowCardinality() *ColLowCardinality[Int256]
- func (c *ColInt256) Nullable() *ColNullable[Int256]
- func (c *ColInt256) Reset()
- func (c ColInt256) Row(i int) Int256
- func (c ColInt256) Rows() int
- func (ColInt256) Type() ColumnType
- func (c ColInt256) WriteColumn(w *Writer)
- type ColInt32
- func (c *ColInt32) Append(v int32)
- func (c *ColInt32) AppendArr(vs []int32)
- func (c *ColInt32) Array() *ColArr[int32]
- func (c *ColInt32) DecodeColumn(r *Reader, rows int) error
- func (c ColInt32) EncodeColumn(b *Buffer)
- func (c *ColInt32) LowCardinality() *ColLowCardinality[int32]
- func (c *ColInt32) Nullable() *ColNullable[int32]
- func (c *ColInt32) Reset()
- func (c ColInt32) Row(i int) int32
- func (c ColInt32) Rows() int
- func (ColInt32) Type() ColumnType
- func (c ColInt32) WriteColumn(w *Writer)
- type ColInt64
- func (c *ColInt64) Append(v int64)
- func (c *ColInt64) AppendArr(vs []int64)
- func (c *ColInt64) Array() *ColArr[int64]
- func (c *ColInt64) DecodeColumn(r *Reader, rows int) error
- func (c ColInt64) EncodeColumn(b *Buffer)
- func (c *ColInt64) LowCardinality() *ColLowCardinality[int64]
- func (c *ColInt64) Nullable() *ColNullable[int64]
- func (c *ColInt64) Reset()
- func (c ColInt64) Row(i int) int64
- func (c ColInt64) Rows() int
- func (ColInt64) Type() ColumnType
- func (c ColInt64) WriteColumn(w *Writer)
- type ColInt8
- func (c *ColInt8) Append(v int8)
- func (c *ColInt8) AppendArr(vs []int8)
- func (c *ColInt8) Array() *ColArr[int8]
- func (c *ColInt8) DecodeColumn(r *Reader, rows int) error
- func (c ColInt8) EncodeColumn(b *Buffer)
- func (c *ColInt8) LowCardinality() *ColLowCardinality[int8]
- func (c *ColInt8) Nullable() *ColNullable[int8]
- func (c *ColInt8) Reset()
- func (c ColInt8) Row(i int) int8
- func (c ColInt8) Rows() int
- func (ColInt8) Type() ColumnType
- func (c ColInt8) WriteColumn(w *Writer)
- type ColInterval
- func (c *ColInterval) Append(v Interval)
- func (c *ColInterval) DecodeColumn(r *Reader, rows int) error
- func (c ColInterval) EncodeColumn(b *Buffer)
- func (c *ColInterval) Infer(t ColumnType) error
- func (c *ColInterval) Reset()
- func (c ColInterval) Row(i int) Interval
- func (c ColInterval) Rows() int
- func (c ColInterval) Type() ColumnType
- func (c ColInterval) WriteColumn(w *Writer)
- type ColJSONBytes
- type ColJSONStr
- func (c *ColJSONStr) Append(v string)
- func (c *ColJSONStr) AppendArr(v []string)
- func (c *ColJSONStr) AppendBytes(v []byte)
- func (c *ColJSONStr) Array() *ColArr[string]
- func (c *ColJSONStr) DecodeColumn(r *Reader, rows int) error
- func (c ColJSONStr) EncodeColumn(b *Buffer)
- func (c ColJSONStr) First() string
- func (c ColJSONStr) ForEach(f func(i int, s string) error) error
- func (c ColJSONStr) ForEachBytes(f func(i int, b []byte) error) error
- func (c *ColJSONStr) LowCardinality() *ColLowCardinality[string]
- func (c *ColJSONStr) Nullable() *ColNullable[string]
- func (c *ColJSONStr) Reset()
- func (c ColJSONStr) Row(i int) string
- func (c ColJSONStr) RowBytes(i int) []byte
- func (c ColJSONStr) Rows() int
- func (ColJSONStr) Type() ColumnType
- func (c ColJSONStr) WriteColumn(w *Writer)
- type ColLowCardinality
- func (c *ColLowCardinality[T]) Append(v T)
- func (c *ColLowCardinality[T]) AppendArr(v []T)
- func (c *ColLowCardinality[T]) Array() *ColArr[T]
- func (c *ColLowCardinality[T]) DecodeColumn(r *Reader, rows int) error
- func (c *ColLowCardinality[T]) DecodeState(r *Reader) error
- func (c *ColLowCardinality[T]) EncodeColumn(b *Buffer)
- func (c ColLowCardinality[T]) EncodeState(b *Buffer)
- func (c *ColLowCardinality[T]) Prepare() error
- func (c *ColLowCardinality[T]) Reset()
- func (c ColLowCardinality[T]) Row(i int) T
- func (c ColLowCardinality[T]) Rows() int
- func (c ColLowCardinality[T]) Type() ColumnType
- func (c *ColLowCardinality[T]) WriteColumn(w *Writer)
- type ColLowCardinalityRaw
- func (c *ColLowCardinalityRaw) AppendKey(i int)
- func (c *ColLowCardinalityRaw) DecodeColumn(r *Reader, rows int) error
- func (c *ColLowCardinalityRaw) DecodeState(r *Reader) error
- func (c ColLowCardinalityRaw) EncodeColumn(b *Buffer)
- func (c ColLowCardinalityRaw) EncodeState(b *Buffer)
- func (c *ColLowCardinalityRaw) Keys() Column
- func (c *ColLowCardinalityRaw) Reset()
- func (c ColLowCardinalityRaw) Rows() int
- func (c ColLowCardinalityRaw) Type() ColumnType
- func (c ColLowCardinalityRaw) WriteColumn(w *Writer)
- type ColMap
- func (c *ColMap[K, V]) Append(m map[K]V)
- func (c *ColMap[K, V]) AppendArr(v []map[K]V)
- func (c *ColMap[K, V]) AppendKV(kv []KV[K, V])
- func (c *ColMap[K, V]) DecodeColumn(r *Reader, rows int) error
- func (c *ColMap[K, V]) DecodeState(r *Reader) error
- func (c ColMap[K, V]) EncodeColumn(b *Buffer)
- func (c ColMap[K, V]) EncodeState(b *Buffer)
- func (c *ColMap[K, V]) Infer(t ColumnType) error
- func (c ColMap[K, V]) Prepare() error
- func (c *ColMap[K, V]) Reset()
- func (c ColMap[K, V]) Row(i int) map[K]V
- func (c ColMap[K, V]) RowKV(i int) []KV[K, V]
- func (c ColMap[K, V]) RowRange(i int) iter.Seq2[K, V]
- func (c ColMap[K, V]) Rows() int
- func (c ColMap[K, V]) Type() ColumnType
- func (c ColMap[K, V]) WriteColumn(w *Writer)
- type ColNamed
- type ColNothing
- func (c *ColNothing) Append(_ Nothing)
- func (c *ColNothing) AppendArr(vs []Nothing)
- func (c *ColNothing) Array() *ColArr[Nothing]
- func (c *ColNothing) DecodeColumn(r *Reader, rows int) error
- func (c ColNothing) EncodeColumn(b *Buffer)
- func (c *ColNothing) Nullable() *ColNullable[Nothing]
- func (c *ColNothing) Reset()
- func (c ColNothing) Row(i int) Nothing
- func (c ColNothing) Rows() int
- func (c ColNothing) Type() ColumnType
- func (c ColNothing) WriteColumn(w *Writer)
- type ColNullable
- func (c *ColNullable[T]) Append(v Nullable[T])
- func (c *ColNullable[T]) AppendArr(v []Nullable[T])
- func (c *ColNullable[T]) Array() *ColArr[Nullable[T]]
- func (c *ColNullable[T]) DecodeColumn(r *Reader, rows int) error
- func (c *ColNullable[T]) DecodeState(r *Reader) error
- func (c ColNullable[T]) EncodeColumn(b *Buffer)
- func (c ColNullable[T]) EncodeState(b *Buffer)
- func (c ColNullable[T]) IsElemNull(i int) bool
- func (c *ColNullable[T]) Reset()
- func (c ColNullable[T]) Row(i int) Nullable[T]
- func (c ColNullable[T]) Rows() int
- func (c ColNullable[T]) Type() ColumnType
- func (c ColNullable[T]) WriteColumn(w *Writer)
- type ColPoint
- func (c *ColPoint) Append(v Point)
- func (c *ColPoint) AppendArr(v []Point)
- func (c *ColPoint) DecodeColumn(r *Reader, rows int) error
- func (c ColPoint) EncodeColumn(b *Buffer)
- func (c *ColPoint) Reset()
- func (c ColPoint) Row(i int) Point
- func (c ColPoint) Rows() int
- func (c ColPoint) Type() ColumnType
- func (c ColPoint) WriteColumn(w *Writer)
- type ColRaw
- type ColRawOf
- func (c *ColRawOf[X]) Append(v X)
- func (c *ColRawOf[X]) AppendArr(v []X)
- func (c *ColRawOf[X]) DecodeColumn(r *Reader, rows int) error
- func (c ColRawOf[X]) EncodeColumn(b *Buffer)
- func (c *ColRawOf[X]) Reset()
- func (c ColRawOf[X]) Row(i int) X
- func (c ColRawOf[X]) Rows() int
- func (c ColRawOf[X]) Size() int
- func (c ColRawOf[X]) Type() ColumnType
- func (c ColRawOf[X]) WriteColumn(w *Writer)
- type ColResult
- type ColStr
- func (c *ColStr) Append(v string)
- func (c *ColStr) AppendArr(v []string)
- func (c *ColStr) AppendBytes(v []byte)
- func (c *ColStr) Array() *ColArr[string]
- func (c *ColStr) DecodeColumn(r *Reader, rows int) error
- func (c ColStr) EncodeColumn(b *Buffer)
- func (c ColStr) First() string
- func (c ColStr) ForEach(f func(i int, s string) error) error
- func (c ColStr) ForEachBytes(f func(i int, b []byte) error) error
- func (c *ColStr) LowCardinality() *ColLowCardinality[string]
- func (c *ColStr) Nullable() *ColNullable[string]
- func (c *ColStr) Reset()
- func (c ColStr) Row(i int) string
- func (c ColStr) RowBytes(i int) []byte
- func (c ColStr) Rows() int
- func (ColStr) Type() ColumnType
- func (c ColStr) WriteColumn(w *Writer)
- type ColTuple
- func (c ColTuple) DecodeColumn(r *Reader, rows int) error
- func (c ColTuple) DecodeState(r *Reader) error
- func (c ColTuple) EncodeColumn(b *Buffer)
- func (c ColTuple) EncodeState(b *Buffer)
- func (c ColTuple) First() Column
- func (c ColTuple) Infer(t ColumnType) error
- func (c ColTuple) Prepare() error
- func (c ColTuple) Reset()
- func (c ColTuple) Rows() int
- func (c ColTuple) Type() ColumnType
- func (c ColTuple) WriteColumn(w *Writer)
- type ColUInt128
- func (c *ColUInt128) Append(v UInt128)
- func (c *ColUInt128) AppendArr(vs []UInt128)
- func (c *ColUInt128) Array() *ColArr[UInt128]
- func (c *ColUInt128) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt128) EncodeColumn(b *Buffer)
- func (c *ColUInt128) LowCardinality() *ColLowCardinality[UInt128]
- func (c *ColUInt128) Nullable() *ColNullable[UInt128]
- func (c *ColUInt128) Reset()
- func (c ColUInt128) Row(i int) UInt128
- func (c ColUInt128) Rows() int
- func (ColUInt128) Type() ColumnType
- func (c ColUInt128) WriteColumn(w *Writer)
- type ColUInt16
- func (c *ColUInt16) Append(v uint16)
- func (c *ColUInt16) AppendArr(vs []uint16)
- func (c *ColUInt16) Array() *ColArr[uint16]
- func (c *ColUInt16) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt16) EncodeColumn(b *Buffer)
- func (c *ColUInt16) LowCardinality() *ColLowCardinality[uint16]
- func (c *ColUInt16) Nullable() *ColNullable[uint16]
- func (c *ColUInt16) Reset()
- func (c ColUInt16) Row(i int) uint16
- func (c ColUInt16) Rows() int
- func (ColUInt16) Type() ColumnType
- func (c ColUInt16) WriteColumn(w *Writer)
- type ColUInt256
- func (c *ColUInt256) Append(v UInt256)
- func (c *ColUInt256) AppendArr(vs []UInt256)
- func (c *ColUInt256) Array() *ColArr[UInt256]
- func (c *ColUInt256) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt256) EncodeColumn(b *Buffer)
- func (c *ColUInt256) LowCardinality() *ColLowCardinality[UInt256]
- func (c *ColUInt256) Nullable() *ColNullable[UInt256]
- func (c *ColUInt256) Reset()
- func (c ColUInt256) Row(i int) UInt256
- func (c ColUInt256) Rows() int
- func (ColUInt256) Type() ColumnType
- func (c ColUInt256) WriteColumn(w *Writer)
- type ColUInt32
- func (c *ColUInt32) Append(v uint32)
- func (c *ColUInt32) AppendArr(vs []uint32)
- func (c *ColUInt32) Array() *ColArr[uint32]
- func (c *ColUInt32) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt32) EncodeColumn(b *Buffer)
- func (c *ColUInt32) LowCardinality() *ColLowCardinality[uint32]
- func (c *ColUInt32) Nullable() *ColNullable[uint32]
- func (c *ColUInt32) Reset()
- func (c ColUInt32) Row(i int) uint32
- func (c ColUInt32) Rows() int
- func (ColUInt32) Type() ColumnType
- func (c ColUInt32) WriteColumn(w *Writer)
- type ColUInt64
- func (c *ColUInt64) Append(v uint64)
- func (c *ColUInt64) AppendArr(vs []uint64)
- func (c *ColUInt64) Array() *ColArr[uint64]
- func (c *ColUInt64) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt64) EncodeColumn(b *Buffer)
- func (c *ColUInt64) LowCardinality() *ColLowCardinality[uint64]
- func (c *ColUInt64) Nullable() *ColNullable[uint64]
- func (c *ColUInt64) Reset()
- func (c ColUInt64) Row(i int) uint64
- func (c ColUInt64) Rows() int
- func (ColUInt64) Type() ColumnType
- func (c ColUInt64) WriteColumn(w *Writer)
- type ColUInt8
- func (c *ColUInt8) Append(v uint8)
- func (c *ColUInt8) AppendArr(vs []uint8)
- func (c *ColUInt8) Array() *ColArr[uint8]
- func (c *ColUInt8) DecodeColumn(r *Reader, rows int) error
- func (c ColUInt8) EncodeColumn(b *Buffer)
- func (c *ColUInt8) LowCardinality() *ColLowCardinality[uint8]
- func (c *ColUInt8) Nullable() *ColNullable[uint8]
- func (c *ColUInt8) Reset()
- func (c ColUInt8) Row(i int) uint8
- func (c ColUInt8) Rows() int
- func (ColUInt8) Type() ColumnType
- func (c ColUInt8) WriteColumn(w *Writer)
- type ColUUID
- func (c *ColUUID) Append(v uuid.UUID)
- func (c *ColUUID) AppendArr(v []uuid.UUID)
- func (c *ColUUID) Array() *ColArr[uuid.UUID]
- func (c *ColUUID) DecodeColumn(r *Reader, rows int) error
- func (c ColUUID) EncodeColumn(b *Buffer)
- func (c *ColUUID) Nullable() *ColNullable[uuid.UUID]
- func (c *ColUUID) Reset()
- func (c ColUUID) Row(i int) uuid.UUID
- func (c ColUUID) Rows() int
- func (c ColUUID) Type() ColumnType
- func (c ColUUID) WriteColumn(w *Writer)
- type Column
- type ColumnOf
- type ColumnType
- func (c ColumnType) Array() ColumnType
- func (c ColumnType) Base() ColumnType
- func (c ColumnType) Conflicts(b ColumnType) bool
- func (c ColumnType) Elem() ColumnType
- func (c ColumnType) IsArray() bool
- func (c ColumnType) String() string
- func (c ColumnType) Sub(subtypes ...ColumnType) ColumnType
- func (c ColumnType) With(params ...string) ColumnType
- type Compression
- type Date
- type Date32
- type DateTime
- type DateTime64
- type Decimal128
- type Decimal256
- type Decimal32
- type Decimal64
- type Decoder
- type Encoder
- type Enum16
- type Enum8
- type Error
- type Exception
- type Feature
- type IPv4
- type IPv6
- type Inferable
- type Input
- type InputColumn
- type Int128
- type Int256
- type Interface
- type Interval
- type IntervalScale
- type KV
- type Log
- type Logs
- type Nothing
- type Nullable
- type Parameter
- type Point
- type Position
- type Precision
- type Preparable
- type Profile
- type ProfileEvent
- type ProfileEventType
- func (i ProfileEventType) IsAProfileEventType() bool
- func (i ProfileEventType) MarshalJSON() ([]byte, error)
- func (i ProfileEventType) MarshalText() ([]byte, error)
- func (i ProfileEventType) String() string
- func (i *ProfileEventType) UnmarshalJSON(data []byte) error
- func (i *ProfileEventType) UnmarshalText(text []byte) error
- type ProfileEvents
- type Progress
- type Query
- type Reader
- func (r *Reader) Bool() (bool, error)
- func (r *Reader) Byte() (byte, error)
- func (r *Reader) Decode(v Decoder) error
- func (r *Reader) DisableCompression()
- func (r *Reader) EnableCompression()
- func (r *Reader) Float32() (float32, error)
- func (r *Reader) Float64() (float64, error)
- func (r *Reader) Int() (int, error)
- func (r *Reader) Int128() (Int128, error)
- func (r *Reader) Int16() (int16, error)
- func (r *Reader) Int32() (int32, error)
- func (r *Reader) Int64() (int64, error)
- func (r *Reader) Int8() (int8, error)
- func (r *Reader) Read(p []byte) (n int, err error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadFull(buf []byte) error
- func (r *Reader) ReadRaw(n int) ([]byte, error)
- func (r *Reader) Str() (string, error)
- func (r *Reader) StrAppend(buf []byte) ([]byte, error)
- func (r *Reader) StrBytes() ([]byte, error)
- func (r *Reader) StrLen() (int, error)
- func (r *Reader) StrRaw() ([]byte, error)
- func (r *Reader) UInt128() (UInt128, error)
- func (r *Reader) UInt16() (uint16, error)
- func (r *Reader) UInt32() (uint32, error)
- func (r *Reader) UInt64() (uint64, error)
- func (r *Reader) UInt8() (uint8, error)
- func (r *Reader) UVarInt() (uint64, error)
- type Resettable
- type Result
- type ResultColumn
- type Results
- type ServerCode
- type ServerHello
- type Setting
- type Stage
- type StateDecoder
- type StateEncoder
- type Stateful
- type TableColumns
- type UInt128
- type UInt256
- type Writer
Examples ¶
Constants ¶
const ( Version = 54460 Name = "clickhouse/ch-go" )
Defaults for ClientHello.
const DateLayout = "2006-01-02"
DateLayout is default time format for Date.
const JSONStringSerializationVersion uint64 = 1
Variables ¶
This section is empty.
Functions ¶
func CardinalityKeyStrings ¶
func CardinalityKeyStrings() []string
CardinalityKeyStrings returns a slice of all String values of the enum
func ClientCodeStrings ¶
func ClientCodeStrings() []string
ClientCodeStrings returns a slice of all String values of the enum
func ClientQueryKindStrings ¶
func ClientQueryKindStrings() []string
ClientQueryKindStrings returns a slice of all String values of the enum
func CompressionStrings ¶
func CompressionStrings() []string
CompressionStrings returns a slice of all String values of the enum
func ErrorStrings ¶
func ErrorStrings() []string
ErrorStrings returns a slice of all String values of the enum
func FeatureStrings ¶
func FeatureStrings() []string
FeatureStrings returns a slice of all String values of the enum
func InterfaceStrings ¶
func InterfaceStrings() []string
InterfaceStrings returns a slice of all String values of the enum
func IntervalScaleStrings ¶ added in v0.45.0
func IntervalScaleStrings() []string
IntervalScaleStrings returns a slice of all String values of the enum
func ProfileEventTypeStrings ¶
func ProfileEventTypeStrings() []string
ProfileEventTypeStrings returns a slice of all String values of the enum
func ServerCodeStrings ¶
func ServerCodeStrings() []string
ServerCodeStrings returns a slice of all String values of the enum
func StageStrings ¶
func StageStrings() []string
StageStrings returns a slice of all String values of the enum
Types ¶
type Arrayable ¶ added in v0.41.0
Arrayable constraint specifies ability of column T to be Array(T).
type AwareDecoder ¶
AwareDecoder implements encoding to Buffer that depends on version.
type AwareEncoder ¶
AwareEncoder implements encoding to Buffer that depends on version.
type Block ¶
func (*Block) DecodeBlock ¶
func (*Block) DecodeRawBlock ¶
func (Block) EncodeAware ¶
func (Block) EncodeBlock ¶
func (b Block) EncodeBlock(buf *Buffer, version int, input []InputColumn) error
Example ¶
package main import ( "bytes" "fmt" "github.com/ClickHouse/ch-go/proto" ) func main() { // See ./internal/cmd/ch-native-dump for more sophisticated example. var ( colK proto.ColInt64 colV proto.ColInt64 ) // Generate some data. for i := 0; i < 100; i++ { colK.Append(int64(i)) colV.Append(int64(i) + 1000) } // Write data to buffer. var buf proto.Buffer input := proto.Input{ {"k", colK}, {"v", colV}, } b := proto.Block{ Rows: colK.Rows(), Columns: len(input), } // Note that we are using version 54451, proto.Version will fail. if err := b.EncodeRawBlock(&buf, 54451, input); err != nil { panic(err) } // You can write buf.Buf to io.Writer, e.g. os.Stdout or file. var out bytes.Buffer _, _ = out.Write(buf.Buf) // You can encode multiple buffers in sequence. // // To do this, reset buf and all columns, append new values // to columns and call EncodeRawBlock again. buf.Reset() colV.Reset() colV.Reset() fmt.Println(out.Len()) }
Output: 1618
func (Block) EncodeRawBlock ¶
func (b Block) EncodeRawBlock(buf *Buffer, version int, input []InputColumn) error
func (Block) WriteBlock ¶ added in v0.63.0
func (b Block) WriteBlock(w *Writer, version int, input []InputColumn) error
type Buffer ¶
type Buffer struct {
Buf []byte
}
Buffer implements ClickHouse binary protocol encoding.
func (*Buffer) EncodeAware ¶
func (b *Buffer) EncodeAware(e AwareEncoder, version int)
EncodeAware value that implements AwareEncoder.
func (*Buffer) PutFloat32 ¶
func (*Buffer) PutFloat64 ¶
func (*Buffer) PutUInt128 ¶
type CardinalityKey ¶
type CardinalityKey byte
CardinalityKey is integer type of ColLowCardinality.Keys column.
const ( KeyUInt8 CardinalityKey = 0 KeyUInt16 CardinalityKey = 1 KeyUInt32 CardinalityKey = 2 KeyUInt64 CardinalityKey = 3 )
Possible integer types for ColLowCardinality.Keys.
func CardinalityKeyString ¶
func CardinalityKeyString(s string) (CardinalityKey, error)
CardinalityKeyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func CardinalityKeyValues ¶
func CardinalityKeyValues() []CardinalityKey
CardinalityKeyValues returns all values of the enum
func (CardinalityKey) IsACardinalityKey ¶
func (i CardinalityKey) IsACardinalityKey() bool
IsACardinalityKey returns "true" if the value is listed in the enum definition. "false" otherwise
func (CardinalityKey) String ¶
func (i CardinalityKey) String() string
type ClientCode ¶
type ClientCode byte
ClientCode is sent from client to server.
const ( ClientCodeHello ClientCode = 0 // client part of "handshake" ClientCodeQuery ClientCode = 1 // query start ClientCodeData ClientCode = 2 // data block (can be compressed) ClientCodeCancel ClientCode = 3 // query cancel ClientCodePing ClientCode = 4 // ping request to server ClientTablesStatusRequest ClientCode = 5 // tables status request )
Possible client codes.
func ClientCodeString ¶
func ClientCodeString(s string) (ClientCode, error)
ClientCodeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ClientCodeValues ¶
func ClientCodeValues() []ClientCode
ClientCodeValues returns all values of the enum
func (ClientCode) IsAClientCode ¶
func (i ClientCode) IsAClientCode() bool
IsAClientCode returns "true" if the value is listed in the enum definition. "false" otherwise
func (ClientCode) String ¶
func (i ClientCode) String() string
type ClientData ¶
type ClientData struct {
TableName string
}
func (*ClientData) DecodeAware ¶
func (c *ClientData) DecodeAware(r *Reader, version int) error
func (ClientData) EncodeAware ¶
func (c ClientData) EncodeAware(b *Buffer, version int)
type ClientHello ¶
type ClientHello struct { Name string Major int // client major version Minor int // client minor version // ProtocolVersion is TCP protocol version of client. // // Usually it is equal to the latest compatible server revision, but // should not be confused with it. ProtocolVersion int Database string User string Password string }
ClientHello represents ClientCodeHello message.
func (*ClientHello) Decode ¶
func (c *ClientHello) Decode(r *Reader) error
type ClientInfo ¶
type ClientInfo struct { ProtocolVersion int Major int Minor int Patch int Interface Interface Query ClientQueryKind InitialUser string InitialQueryID string InitialAddress string InitialTime int64 OSUser string ClientHostname string ClientName string Span trace.SpanContext QuotaKey string DistributedDepth int CollaborateWithInitiator bool CountParticipatingReplicas int NumberOfCurrentReplica int }
ClientInfo message.
func (*ClientInfo) DecodeAware ¶
func (c *ClientInfo) DecodeAware(r *Reader, version int) error
func (ClientInfo) EncodeAware ¶
func (c ClientInfo) EncodeAware(b *Buffer, version int)
EncodeAware encodes to buffer version-aware.
type ClientQueryKind ¶
type ClientQueryKind byte
ClientQueryKind is kind of query.
const ( ClientQueryNone ClientQueryKind = 0 ClientQueryInitial ClientQueryKind = 1 ClientQuerySecondary ClientQueryKind = 2 )
Possible query kinds.
func ClientQueryKindString ¶
func ClientQueryKindString(s string) (ClientQueryKind, error)
ClientQueryKindString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ClientQueryKindValues ¶
func ClientQueryKindValues() []ClientQueryKind
ClientQueryKindValues returns all values of the enum
func (ClientQueryKind) IsAClientQueryKind ¶
func (i ClientQueryKind) IsAClientQueryKind() bool
IsAClientQueryKind returns "true" if the value is listed in the enum definition. "false" otherwise
func (ClientQueryKind) String ¶
func (i ClientQueryKind) String() string
type ColArr ¶
ColArr is Array(T).
func NewArrDateTime ¶
NewArrDateTime returns new Array(DateTime).
func NewArrDecimal128 ¶
func NewArrDecimal128() *ColArr[Decimal128]
NewArrDecimal128 returns new Array(Decimal128).
func NewArrDecimal256 ¶
func NewArrDecimal256() *ColArr[Decimal256]
NewArrDecimal256 returns new Array(Decimal256).
func NewArrDecimal32 ¶
NewArrDecimal32 returns new Array(Decimal32).
func NewArrDecimal64 ¶
NewArrDecimal64 returns new Array(Decimal64).
func NewArrFixedStr128 ¶ added in v0.57.0
NewArrFixedStr128 returns new Array(FixedStr128).
func NewArrFixedStr16 ¶ added in v0.57.0
NewArrFixedStr16 returns new Array(FixedStr16).
func NewArrFixedStr256 ¶ added in v0.57.0
NewArrFixedStr256 returns new Array(FixedStr256).
func NewArrFixedStr32 ¶ added in v0.57.0
NewArrFixedStr32 returns new Array(FixedStr32).
func NewArrFixedStr512 ¶ added in v0.57.0
NewArrFixedStr512 returns new Array(FixedStr512).
func NewArrFixedStr64 ¶ added in v0.57.0
NewArrFixedStr64 returns new Array(FixedStr64).
func NewArrFixedStr8 ¶ added in v0.57.0
NewArrFixedStr8 returns new Array(FixedStr8).
func NewArrFloat32 ¶
NewArrFloat32 returns new Array(Float32).
func NewArrFloat64 ¶
NewArrFloat64 returns new Array(Float64).
func NewArrUInt128 ¶
NewArrUInt128 returns new Array(UInt128).
func NewArrUInt256 ¶
NewArrUInt256 returns new Array(UInt256).
func NewArray ¶ added in v0.41.0
NewArray returns ColArr of c.
Example: NewArray[string](new(ColStr))
func (*ColArr[T]) Append ¶ added in v0.41.0
func (c *ColArr[T]) Append(v []T)
Append appends new row to column.
func (*ColArr[T]) AppendArr ¶ added in v0.55.0
func (c *ColArr[T]) AppendArr(vs [][]T)
AppendArr appends new slice of rows to column.
func (*ColArr[T]) DecodeColumn ¶
DecodeColumn implements ColResult.
func (*ColArr[T]) DecodeState ¶
func (ColArr[T]) EncodeColumn ¶
EncodeColumn implements ColInput.
func (*ColArr[T]) EncodeState ¶
func (*ColArr[T]) Infer ¶ added in v0.41.0
func (c *ColArr[T]) Infer(t ColumnType) error
Infer ensures Inferable column propagation.
func (*ColArr[T]) Result ¶ added in v0.41.0
func (c *ColArr[T]) Result(column string) ResultColumn
Result for current column.
func (ColArr[T]) Type ¶
func (c ColArr[T]) Type() ColumnType
Type returns type of array, i.e. Array(T).
func (ColArr[T]) WriteColumn ¶ added in v0.63.0
WriteColumn implements ColInput.
type ColAuto ¶
type ColAuto struct { Data Column DataType ColumnType }
ColAuto is column that is initialized during decoding.
func (ColAuto) EncodeColumn ¶
func (*ColAuto) Infer ¶
func (c *ColAuto) Infer(t ColumnType) error
Infer and initialize Column from ColumnType.
func (ColAuto) Type ¶
func (c ColAuto) Type() ColumnType
func (ColAuto) WriteColumn ¶ added in v0.63.0
type ColBool ¶
type ColBool []bool
ColBool is Bool column.
func (*ColBool) DecodeColumn ¶
DecodeColumn decodes Bool rows from *Reader.
func (ColBool) EncodeColumn ¶
EncodeColumn encodes Bool rows to *Buffer.
func (*ColBool) Nullable ¶ added in v0.41.0
func (c *ColBool) Nullable() *ColNullable[bool]
Nullable is helper that creates Nullable(Bool).
func (*ColBool) Reset ¶
func (c *ColBool) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColBool) WriteColumn ¶ added in v0.63.0
WriteColumn writes Bool rows to *Writer.
type ColBytes ¶
type ColBytes struct {
ColStr
}
ColBytes is ColStr wrapper to be ColumnOf for []byte.
func (*ColBytes) Nullable ¶ added in v0.41.0
func (c *ColBytes) Nullable() *ColNullable[[]byte]
Nullable is helper that creates Nullable(String).
type ColDate ¶
type ColDate []Date
ColDate represents Date column.
func (*ColDate) DecodeColumn ¶
DecodeColumn decodes Date rows from *Reader.
func (ColDate) EncodeColumn ¶
EncodeColumn encodes Date rows to *Buffer.
func (*ColDate) LowCardinality ¶
func (c *ColDate) LowCardinality() *ColLowCardinality[time.Time]
LowCardinality returns LowCardinality for Enum8.
func (*ColDate) Nullable ¶ added in v0.41.0
func (c *ColDate) Nullable() *ColNullable[time.Time]
Nullable is helper that creates Nullable(Enum8).
func (*ColDate) Reset ¶
func (c *ColDate) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDate) WriteColumn ¶ added in v0.63.0
type ColDate32 ¶
type ColDate32 []Date32
ColDate32 represents Date32 column.
func (*ColDate32) DecodeColumn ¶
DecodeColumn decodes Date32 rows from *Reader.
func (ColDate32) EncodeColumn ¶
EncodeColumn encodes Date32 rows to *Buffer.
func (*ColDate32) LowCardinality ¶
func (c *ColDate32) LowCardinality() *ColLowCardinality[time.Time]
LowCardinality returns LowCardinality for Enum8.
func (*ColDate32) Nullable ¶ added in v0.41.0
func (c *ColDate32) Nullable() *ColNullable[time.Time]
Nullable is helper that creates Nullable(Enum8).
func (*ColDate32) Reset ¶
func (c *ColDate32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDate32) WriteColumn ¶ added in v0.63.0
type ColDateTime ¶
ColDateTime implements ColumnOf[time.Time].
func (*ColDateTime) Append ¶
func (c *ColDateTime) Append(v time.Time)
func (*ColDateTime) AppendArr ¶
func (c *ColDateTime) AppendArr(vs []time.Time)
func (*ColDateTime) AppendRaw ¶ added in v0.64.0
func (c *ColDateTime) AppendRaw(v DateTime)
func (*ColDateTime) Array ¶
func (c *ColDateTime) Array() *ColArr[time.Time]
Array is helper that creates Array of Enum8.
func (*ColDateTime) DecodeColumn ¶
func (c *ColDateTime) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes DateTime rows from *Reader.
func (ColDateTime) EncodeColumn ¶
func (c ColDateTime) EncodeColumn(b *Buffer)
EncodeColumn encodes DateTime rows to *Buffer.
func (*ColDateTime) Infer ¶ added in v0.43.0
func (c *ColDateTime) Infer(t ColumnType) error
func (*ColDateTime) LowCardinality ¶
func (c *ColDateTime) LowCardinality() *ColLowCardinality[time.Time]
LowCardinality returns LowCardinality for Enum8.
func (*ColDateTime) Nullable ¶ added in v0.41.0
func (c *ColDateTime) Nullable() *ColNullable[time.Time]
Nullable is helper that creates Nullable(Enum8).
func (*ColDateTime) Reset ¶
func (c *ColDateTime) Reset()
func (ColDateTime) Rows ¶
func (c ColDateTime) Rows() int
func (ColDateTime) Type ¶
func (c ColDateTime) Type() ColumnType
func (ColDateTime) WriteColumn ¶ added in v0.63.0
func (c ColDateTime) WriteColumn(w *Writer)
type ColDateTime64 ¶
type ColDateTime64 struct { Data []DateTime64 Location *time.Location Precision Precision PrecisionSet bool }
ColDateTime64 implements ColumnOf[time.Time].
If Precision is not set, Append and Row() panics. Use ColDateTime64Raw to work with raw DateTime64 values.
func (*ColDateTime64) Append ¶
func (c *ColDateTime64) Append(v time.Time)
func (*ColDateTime64) AppendArr ¶
func (c *ColDateTime64) AppendArr(v []time.Time)
func (*ColDateTime64) AppendRaw ¶ added in v0.44.0
func (c *ColDateTime64) AppendRaw(v DateTime64)
func (*ColDateTime64) DecodeColumn ¶
func (c *ColDateTime64) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes DateTime64 rows from *Reader.
func (ColDateTime64) EncodeColumn ¶
func (c ColDateTime64) EncodeColumn(b *Buffer)
EncodeColumn encodes DateTime64 rows to *Buffer.
func (*ColDateTime64) Infer ¶ added in v0.43.0
func (c *ColDateTime64) Infer(t ColumnType) error
func (*ColDateTime64) Nullable ¶ added in v0.41.0
func (c *ColDateTime64) Nullable() *ColNullable[time.Time]
func (ColDateTime64) Raw ¶ added in v0.44.0
func (c ColDateTime64) Raw() *ColDateTime64Raw
Raw version of ColDateTime64 for ColumnOf[DateTime64].
func (*ColDateTime64) Reset ¶
func (c *ColDateTime64) Reset()
func (ColDateTime64) Rows ¶
func (c ColDateTime64) Rows() int
func (ColDateTime64) Type ¶
func (c ColDateTime64) Type() ColumnType
func (*ColDateTime64) WithLocation ¶ added in v0.43.0
func (c *ColDateTime64) WithLocation(loc *time.Location) *ColDateTime64
func (*ColDateTime64) WithPrecision ¶ added in v0.43.0
func (c *ColDateTime64) WithPrecision(p Precision) *ColDateTime64
func (ColDateTime64) WriteColumn ¶ added in v0.63.0
func (c ColDateTime64) WriteColumn(w *Writer)
type ColDateTime64Raw ¶ added in v0.44.0
type ColDateTime64Raw struct {
ColDateTime64
}
ColDateTime64Raw is DateTime64 wrapper to implement ColumnOf[DateTime64].
func (*ColDateTime64Raw) Append ¶ added in v0.44.0
func (c *ColDateTime64Raw) Append(v DateTime64)
func (*ColDateTime64Raw) AppendArr ¶ added in v0.55.0
func (c *ColDateTime64Raw) AppendArr(vs []DateTime64)
func (ColDateTime64Raw) Row ¶ added in v0.44.0
func (c ColDateTime64Raw) Row(i int) DateTime64
type ColDecimal128 ¶
type ColDecimal128 []Decimal128
ColDecimal128 represents Decimal128 column.
func (*ColDecimal128) Append ¶
func (c *ColDecimal128) Append(v Decimal128)
Append Decimal128 to column.
func (*ColDecimal128) AppendArr ¶
func (c *ColDecimal128) AppendArr(vs []Decimal128)
Append Decimal128 slice to column.
func (*ColDecimal128) Array ¶
func (c *ColDecimal128) Array() *ColArr[Decimal128]
Array is helper that creates Array of Decimal128.
func (*ColDecimal128) DecodeColumn ¶
func (c *ColDecimal128) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Decimal128 rows from *Reader.
func (ColDecimal128) EncodeColumn ¶
func (c ColDecimal128) EncodeColumn(b *Buffer)
EncodeColumn encodes Decimal128 rows to *Buffer.
func (*ColDecimal128) LowCardinality ¶
func (c *ColDecimal128) LowCardinality() *ColLowCardinality[Decimal128]
LowCardinality returns LowCardinality for Decimal128.
func (*ColDecimal128) Nullable ¶ added in v0.41.0
func (c *ColDecimal128) Nullable() *ColNullable[Decimal128]
Nullable is helper that creates Nullable(Decimal128).
func (*ColDecimal128) Reset ¶
func (c *ColDecimal128) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDecimal128) Row ¶
func (c ColDecimal128) Row(i int) Decimal128
Row returns i-th row of column.
func (ColDecimal128) Type ¶
func (ColDecimal128) Type() ColumnType
Type returns ColumnType of Decimal128.
func (ColDecimal128) WriteColumn ¶ added in v0.63.0
func (c ColDecimal128) WriteColumn(w *Writer)
type ColDecimal256 ¶
type ColDecimal256 []Decimal256
ColDecimal256 represents Decimal256 column.
func (*ColDecimal256) Append ¶
func (c *ColDecimal256) Append(v Decimal256)
Append Decimal256 to column.
func (*ColDecimal256) AppendArr ¶
func (c *ColDecimal256) AppendArr(vs []Decimal256)
Append Decimal256 slice to column.
func (*ColDecimal256) Array ¶
func (c *ColDecimal256) Array() *ColArr[Decimal256]
Array is helper that creates Array of Decimal256.
func (*ColDecimal256) DecodeColumn ¶
func (c *ColDecimal256) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Decimal256 rows from *Reader.
func (ColDecimal256) EncodeColumn ¶
func (c ColDecimal256) EncodeColumn(b *Buffer)
EncodeColumn encodes Decimal256 rows to *Buffer.
func (*ColDecimal256) LowCardinality ¶
func (c *ColDecimal256) LowCardinality() *ColLowCardinality[Decimal256]
LowCardinality returns LowCardinality for Decimal256.
func (*ColDecimal256) Nullable ¶ added in v0.41.0
func (c *ColDecimal256) Nullable() *ColNullable[Decimal256]
Nullable is helper that creates Nullable(Decimal256).
func (*ColDecimal256) Reset ¶
func (c *ColDecimal256) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDecimal256) Row ¶
func (c ColDecimal256) Row(i int) Decimal256
Row returns i-th row of column.
func (ColDecimal256) Type ¶
func (ColDecimal256) Type() ColumnType
Type returns ColumnType of Decimal256.
func (ColDecimal256) WriteColumn ¶ added in v0.63.0
func (c ColDecimal256) WriteColumn(w *Writer)
type ColDecimal32 ¶
type ColDecimal32 []Decimal32
ColDecimal32 represents Decimal32 column.
func (*ColDecimal32) Append ¶
func (c *ColDecimal32) Append(v Decimal32)
Append Decimal32 to column.
func (*ColDecimal32) AppendArr ¶
func (c *ColDecimal32) AppendArr(vs []Decimal32)
Append Decimal32 slice to column.
func (*ColDecimal32) Array ¶
func (c *ColDecimal32) Array() *ColArr[Decimal32]
Array is helper that creates Array of Decimal32.
func (*ColDecimal32) DecodeColumn ¶
func (c *ColDecimal32) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Decimal32 rows from *Reader.
func (ColDecimal32) EncodeColumn ¶
func (c ColDecimal32) EncodeColumn(b *Buffer)
EncodeColumn encodes Decimal32 rows to *Buffer.
func (*ColDecimal32) LowCardinality ¶
func (c *ColDecimal32) LowCardinality() *ColLowCardinality[Decimal32]
LowCardinality returns LowCardinality for Decimal32.
func (*ColDecimal32) Nullable ¶ added in v0.41.0
func (c *ColDecimal32) Nullable() *ColNullable[Decimal32]
Nullable is helper that creates Nullable(Decimal32).
func (*ColDecimal32) Reset ¶
func (c *ColDecimal32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDecimal32) Row ¶
func (c ColDecimal32) Row(i int) Decimal32
Row returns i-th row of column.
func (ColDecimal32) Type ¶
func (ColDecimal32) Type() ColumnType
Type returns ColumnType of Decimal32.
func (ColDecimal32) WriteColumn ¶ added in v0.63.0
func (c ColDecimal32) WriteColumn(w *Writer)
type ColDecimal64 ¶
type ColDecimal64 []Decimal64
ColDecimal64 represents Decimal64 column.
func (*ColDecimal64) Append ¶
func (c *ColDecimal64) Append(v Decimal64)
Append Decimal64 to column.
func (*ColDecimal64) AppendArr ¶
func (c *ColDecimal64) AppendArr(vs []Decimal64)
Append Decimal64 slice to column.
func (*ColDecimal64) Array ¶
func (c *ColDecimal64) Array() *ColArr[Decimal64]
Array is helper that creates Array of Decimal64.
func (*ColDecimal64) DecodeColumn ¶
func (c *ColDecimal64) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Decimal64 rows from *Reader.
func (ColDecimal64) EncodeColumn ¶
func (c ColDecimal64) EncodeColumn(b *Buffer)
EncodeColumn encodes Decimal64 rows to *Buffer.
func (*ColDecimal64) LowCardinality ¶
func (c *ColDecimal64) LowCardinality() *ColLowCardinality[Decimal64]
LowCardinality returns LowCardinality for Decimal64.
func (*ColDecimal64) Nullable ¶ added in v0.41.0
func (c *ColDecimal64) Nullable() *ColNullable[Decimal64]
Nullable is helper that creates Nullable(Decimal64).
func (*ColDecimal64) Reset ¶
func (c *ColDecimal64) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColDecimal64) Row ¶
func (c ColDecimal64) Row(i int) Decimal64
Row returns i-th row of column.
func (ColDecimal64) Type ¶
func (ColDecimal64) Type() ColumnType
Type returns ColumnType of Decimal64.
func (ColDecimal64) WriteColumn ¶ added in v0.63.0
func (c ColDecimal64) WriteColumn(w *Writer)
type ColEnum ¶ added in v0.42.0
type ColEnum struct { // Values of ColEnum. Values []string // contains filtered or unexported fields }
ColEnum is inference helper for enums.
You can set Values and actual enum mapping will be inferred during query execution.
func (*ColEnum) DecodeColumn ¶ added in v0.42.0
func (*ColEnum) EncodeColumn ¶ added in v0.42.0
func (*ColEnum) Infer ¶ added in v0.42.0
func (e *ColEnum) Infer(t ColumnType) error
func (*ColEnum) Type ¶ added in v0.42.0
func (e *ColEnum) Type() ColumnType
func (*ColEnum) WriteColumn ¶ added in v0.63.0
type ColEnum16 ¶
type ColEnum16 []Enum16
ColEnum16 represents Enum16 column.
func (*ColEnum16) DecodeColumn ¶
DecodeColumn decodes Enum16 rows from *Reader.
func (ColEnum16) EncodeColumn ¶
EncodeColumn encodes Enum16 rows to *Buffer.
func (*ColEnum16) LowCardinality ¶
func (c *ColEnum16) LowCardinality() *ColLowCardinality[Enum16]
LowCardinality returns LowCardinality for Enum16.
func (*ColEnum16) Nullable ¶ added in v0.41.0
func (c *ColEnum16) Nullable() *ColNullable[Enum16]
Nullable is helper that creates Nullable(Enum16).
func (*ColEnum16) Reset ¶
func (c *ColEnum16) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColEnum16) WriteColumn ¶ added in v0.63.0
type ColEnum8 ¶
type ColEnum8 []Enum8
ColEnum8 represents Enum8 column.
func (*ColEnum8) DecodeColumn ¶
DecodeColumn decodes Enum8 rows from *Reader.
func (ColEnum8) EncodeColumn ¶
EncodeColumn encodes Enum8 rows to *Buffer.
func (*ColEnum8) LowCardinality ¶
func (c *ColEnum8) LowCardinality() *ColLowCardinality[Enum8]
LowCardinality returns LowCardinality for Enum8.
func (*ColEnum8) Nullable ¶ added in v0.41.0
func (c *ColEnum8) Nullable() *ColNullable[Enum8]
Nullable is helper that creates Nullable(Enum8).
func (*ColEnum8) Reset ¶
func (c *ColEnum8) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColEnum8) WriteColumn ¶ added in v0.63.0
type ColFixedStr ¶
ColFixedStr represents FixedString(Size) column. Size is required.
Can be used to store SHA256, MD5 or similar fixed size binary values. See https://clickhouse.com/docs/en/sql-reference/data-types/fixedstring/.
func (*ColFixedStr) Append ¶
func (c *ColFixedStr) Append(b []byte)
Append value to column. Panics if len(b) != Size.
If Size is not set, will set to len of first value.
func (*ColFixedStr) AppendArr ¶ added in v0.55.0
func (c *ColFixedStr) AppendArr(vs [][]byte)
func (*ColFixedStr) Array ¶ added in v0.51.0
func (c *ColFixedStr) Array() *ColArr[[]byte]
Array returns new Array(FixedString).
func (*ColFixedStr) DecodeColumn ¶
func (c *ColFixedStr) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes ColFixedStr rows from *Reader.
func (ColFixedStr) EncodeColumn ¶
func (c ColFixedStr) EncodeColumn(b *Buffer)
EncodeColumn encodes ColFixedStr rows to *Buffer.
func (*ColFixedStr) Reset ¶
func (c *ColFixedStr) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (*ColFixedStr) SetSize ¶
func (c *ColFixedStr) SetSize(n int)
SetSize sets Size of FixedString(Size) to n.
Can be called during decode to infer size from result.
func (ColFixedStr) Type ¶
func (c ColFixedStr) Type() ColumnType
Type returns ColumnType of FixedString.
func (ColFixedStr) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr) WriteColumn(w *Writer)
WriteColumn writes ColFixedStr rows to *Writer.
type ColFixedStr128 ¶ added in v0.57.0
type ColFixedStr128 [][128]byte
ColFixedStr128 represents FixedStr128 column.
func (*ColFixedStr128) Append ¶ added in v0.57.0
func (c *ColFixedStr128) Append(v [128]byte)
Append [128]byte to column.
func (*ColFixedStr128) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr128) AppendArr(vs [][128]byte)
Append [128]byte slice to column.
func (*ColFixedStr128) Array ¶ added in v0.57.0
func (c *ColFixedStr128) Array() *ColArr[[128]byte]
Array is helper that creates Array of [128]byte.
func (*ColFixedStr128) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr128) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr128 rows from *Reader.
func (ColFixedStr128) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr128) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr128 rows to *Buffer.
func (*ColFixedStr128) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr128) LowCardinality() *ColLowCardinality[[128]byte]
LowCardinality returns LowCardinality for FixedStr128.
func (*ColFixedStr128) Nullable ¶ added in v0.57.0
func (c *ColFixedStr128) Nullable() *ColNullable[[128]byte]
Nullable is helper that creates Nullable([128]byte).
func (*ColFixedStr128) Reset ¶ added in v0.57.0
func (c *ColFixedStr128) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr128) Row ¶ added in v0.57.0
func (c ColFixedStr128) Row(i int) [128]byte
Row returns i-th row of column.
func (ColFixedStr128) Rows ¶ added in v0.57.0
func (c ColFixedStr128) Rows() int
Rows returns count of rows in column.
func (ColFixedStr128) Type ¶ added in v0.57.0
func (ColFixedStr128) Type() ColumnType
Type returns ColumnType of FixedStr128.
func (ColFixedStr128) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr128) WriteColumn(w *Writer)
type ColFixedStr16 ¶ added in v0.57.0
type ColFixedStr16 [][16]byte
ColFixedStr16 represents FixedStr16 column.
func (*ColFixedStr16) Append ¶ added in v0.57.0
func (c *ColFixedStr16) Append(v [16]byte)
Append [16]byte to column.
func (*ColFixedStr16) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr16) AppendArr(vs [][16]byte)
Append [16]byte slice to column.
func (*ColFixedStr16) Array ¶ added in v0.57.0
func (c *ColFixedStr16) Array() *ColArr[[16]byte]
Array is helper that creates Array of [16]byte.
func (*ColFixedStr16) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr16) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr16 rows from *Reader.
func (ColFixedStr16) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr16) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr16 rows to *Buffer.
func (*ColFixedStr16) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr16) LowCardinality() *ColLowCardinality[[16]byte]
LowCardinality returns LowCardinality for FixedStr16.
func (*ColFixedStr16) Nullable ¶ added in v0.57.0
func (c *ColFixedStr16) Nullable() *ColNullable[[16]byte]
Nullable is helper that creates Nullable([16]byte).
func (*ColFixedStr16) Reset ¶ added in v0.57.0
func (c *ColFixedStr16) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr16) Row ¶ added in v0.57.0
func (c ColFixedStr16) Row(i int) [16]byte
Row returns i-th row of column.
func (ColFixedStr16) Rows ¶ added in v0.57.0
func (c ColFixedStr16) Rows() int
Rows returns count of rows in column.
func (ColFixedStr16) Type ¶ added in v0.57.0
func (ColFixedStr16) Type() ColumnType
Type returns ColumnType of FixedStr16.
func (ColFixedStr16) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr16) WriteColumn(w *Writer)
type ColFixedStr256 ¶ added in v0.57.0
type ColFixedStr256 [][256]byte
ColFixedStr256 represents FixedStr256 column.
func (*ColFixedStr256) Append ¶ added in v0.57.0
func (c *ColFixedStr256) Append(v [256]byte)
Append [256]byte to column.
func (*ColFixedStr256) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr256) AppendArr(vs [][256]byte)
Append [256]byte slice to column.
func (*ColFixedStr256) Array ¶ added in v0.57.0
func (c *ColFixedStr256) Array() *ColArr[[256]byte]
Array is helper that creates Array of [256]byte.
func (*ColFixedStr256) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr256) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr256 rows from *Reader.
func (ColFixedStr256) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr256) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr256 rows to *Buffer.
func (*ColFixedStr256) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr256) LowCardinality() *ColLowCardinality[[256]byte]
LowCardinality returns LowCardinality for FixedStr256.
func (*ColFixedStr256) Nullable ¶ added in v0.57.0
func (c *ColFixedStr256) Nullable() *ColNullable[[256]byte]
Nullable is helper that creates Nullable([256]byte).
func (*ColFixedStr256) Reset ¶ added in v0.57.0
func (c *ColFixedStr256) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr256) Row ¶ added in v0.57.0
func (c ColFixedStr256) Row(i int) [256]byte
Row returns i-th row of column.
func (ColFixedStr256) Rows ¶ added in v0.57.0
func (c ColFixedStr256) Rows() int
Rows returns count of rows in column.
func (ColFixedStr256) Type ¶ added in v0.57.0
func (ColFixedStr256) Type() ColumnType
Type returns ColumnType of FixedStr256.
func (ColFixedStr256) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr256) WriteColumn(w *Writer)
type ColFixedStr32 ¶ added in v0.57.0
type ColFixedStr32 [][32]byte
ColFixedStr32 represents FixedStr32 column.
func (*ColFixedStr32) Append ¶ added in v0.57.0
func (c *ColFixedStr32) Append(v [32]byte)
Append [32]byte to column.
func (*ColFixedStr32) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr32) AppendArr(vs [][32]byte)
Append [32]byte slice to column.
func (*ColFixedStr32) Array ¶ added in v0.57.0
func (c *ColFixedStr32) Array() *ColArr[[32]byte]
Array is helper that creates Array of [32]byte.
func (*ColFixedStr32) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr32) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr32 rows from *Reader.
func (ColFixedStr32) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr32) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr32 rows to *Buffer.
func (*ColFixedStr32) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr32) LowCardinality() *ColLowCardinality[[32]byte]
LowCardinality returns LowCardinality for FixedStr32.
func (*ColFixedStr32) Nullable ¶ added in v0.57.0
func (c *ColFixedStr32) Nullable() *ColNullable[[32]byte]
Nullable is helper that creates Nullable([32]byte).
func (*ColFixedStr32) Reset ¶ added in v0.57.0
func (c *ColFixedStr32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr32) Row ¶ added in v0.57.0
func (c ColFixedStr32) Row(i int) [32]byte
Row returns i-th row of column.
func (ColFixedStr32) Rows ¶ added in v0.57.0
func (c ColFixedStr32) Rows() int
Rows returns count of rows in column.
func (ColFixedStr32) Type ¶ added in v0.57.0
func (ColFixedStr32) Type() ColumnType
Type returns ColumnType of FixedStr32.
func (ColFixedStr32) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr32) WriteColumn(w *Writer)
type ColFixedStr512 ¶ added in v0.57.0
type ColFixedStr512 [][512]byte
ColFixedStr512 represents FixedStr512 column.
func (*ColFixedStr512) Append ¶ added in v0.57.0
func (c *ColFixedStr512) Append(v [512]byte)
Append [512]byte to column.
func (*ColFixedStr512) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr512) AppendArr(vs [][512]byte)
Append [512]byte slice to column.
func (*ColFixedStr512) Array ¶ added in v0.57.0
func (c *ColFixedStr512) Array() *ColArr[[512]byte]
Array is helper that creates Array of [512]byte.
func (*ColFixedStr512) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr512) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr512 rows from *Reader.
func (ColFixedStr512) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr512) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr512 rows to *Buffer.
func (*ColFixedStr512) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr512) LowCardinality() *ColLowCardinality[[512]byte]
LowCardinality returns LowCardinality for FixedStr512.
func (*ColFixedStr512) Nullable ¶ added in v0.57.0
func (c *ColFixedStr512) Nullable() *ColNullable[[512]byte]
Nullable is helper that creates Nullable([512]byte).
func (*ColFixedStr512) Reset ¶ added in v0.57.0
func (c *ColFixedStr512) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr512) Row ¶ added in v0.57.0
func (c ColFixedStr512) Row(i int) [512]byte
Row returns i-th row of column.
func (ColFixedStr512) Rows ¶ added in v0.57.0
func (c ColFixedStr512) Rows() int
Rows returns count of rows in column.
func (ColFixedStr512) Type ¶ added in v0.57.0
func (ColFixedStr512) Type() ColumnType
Type returns ColumnType of FixedStr512.
func (ColFixedStr512) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr512) WriteColumn(w *Writer)
type ColFixedStr64 ¶ added in v0.57.0
type ColFixedStr64 [][64]byte
ColFixedStr64 represents FixedStr64 column.
func (*ColFixedStr64) Append ¶ added in v0.57.0
func (c *ColFixedStr64) Append(v [64]byte)
Append [64]byte to column.
func (*ColFixedStr64) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr64) AppendArr(vs [][64]byte)
Append [64]byte slice to column.
func (*ColFixedStr64) Array ¶ added in v0.57.0
func (c *ColFixedStr64) Array() *ColArr[[64]byte]
Array is helper that creates Array of [64]byte.
func (*ColFixedStr64) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr64) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr64 rows from *Reader.
func (ColFixedStr64) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr64) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr64 rows to *Buffer.
func (*ColFixedStr64) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr64) LowCardinality() *ColLowCardinality[[64]byte]
LowCardinality returns LowCardinality for FixedStr64.
func (*ColFixedStr64) Nullable ¶ added in v0.57.0
func (c *ColFixedStr64) Nullable() *ColNullable[[64]byte]
Nullable is helper that creates Nullable([64]byte).
func (*ColFixedStr64) Reset ¶ added in v0.57.0
func (c *ColFixedStr64) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr64) Row ¶ added in v0.57.0
func (c ColFixedStr64) Row(i int) [64]byte
Row returns i-th row of column.
func (ColFixedStr64) Rows ¶ added in v0.57.0
func (c ColFixedStr64) Rows() int
Rows returns count of rows in column.
func (ColFixedStr64) Type ¶ added in v0.57.0
func (ColFixedStr64) Type() ColumnType
Type returns ColumnType of FixedStr64.
func (ColFixedStr64) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr64) WriteColumn(w *Writer)
type ColFixedStr8 ¶ added in v0.57.0
type ColFixedStr8 [][8]byte
ColFixedStr8 represents FixedStr8 column.
func (*ColFixedStr8) Append ¶ added in v0.57.0
func (c *ColFixedStr8) Append(v [8]byte)
Append [8]byte to column.
func (*ColFixedStr8) AppendArr ¶ added in v0.57.0
func (c *ColFixedStr8) AppendArr(vs [][8]byte)
Append [8]byte slice to column.
func (*ColFixedStr8) Array ¶ added in v0.57.0
func (c *ColFixedStr8) Array() *ColArr[[8]byte]
Array is helper that creates Array of [8]byte.
func (*ColFixedStr8) DecodeColumn ¶ added in v0.57.0
func (c *ColFixedStr8) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes FixedStr8 rows from *Reader.
func (ColFixedStr8) EncodeColumn ¶ added in v0.57.0
func (c ColFixedStr8) EncodeColumn(b *Buffer)
EncodeColumn encodes FixedStr8 rows to *Buffer.
func (*ColFixedStr8) LowCardinality ¶ added in v0.57.0
func (c *ColFixedStr8) LowCardinality() *ColLowCardinality[[8]byte]
LowCardinality returns LowCardinality for FixedStr8.
func (*ColFixedStr8) Nullable ¶ added in v0.57.0
func (c *ColFixedStr8) Nullable() *ColNullable[[8]byte]
Nullable is helper that creates Nullable([8]byte).
func (*ColFixedStr8) Reset ¶ added in v0.57.0
func (c *ColFixedStr8) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFixedStr8) Row ¶ added in v0.57.0
func (c ColFixedStr8) Row(i int) [8]byte
Row returns i-th row of column.
func (ColFixedStr8) Rows ¶ added in v0.57.0
func (c ColFixedStr8) Rows() int
Rows returns count of rows in column.
func (ColFixedStr8) Type ¶ added in v0.57.0
func (ColFixedStr8) Type() ColumnType
Type returns ColumnType of FixedStr8.
func (ColFixedStr8) WriteColumn ¶ added in v0.63.0
func (c ColFixedStr8) WriteColumn(w *Writer)
type ColFloat32 ¶
type ColFloat32 []float32
ColFloat32 represents Float32 column.
func (*ColFloat32) AppendArr ¶
func (c *ColFloat32) AppendArr(vs []float32)
Append float32 slice to column.
func (*ColFloat32) Array ¶
func (c *ColFloat32) Array() *ColArr[float32]
Array is helper that creates Array of float32.
func (*ColFloat32) DecodeColumn ¶
func (c *ColFloat32) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Float32 rows from *Reader.
func (ColFloat32) EncodeColumn ¶
func (c ColFloat32) EncodeColumn(b *Buffer)
EncodeColumn encodes Float32 rows to *Buffer.
func (*ColFloat32) LowCardinality ¶
func (c *ColFloat32) LowCardinality() *ColLowCardinality[float32]
LowCardinality returns LowCardinality for Float32.
func (*ColFloat32) Nullable ¶ added in v0.41.0
func (c *ColFloat32) Nullable() *ColNullable[float32]
Nullable is helper that creates Nullable(float32).
func (*ColFloat32) Reset ¶
func (c *ColFloat32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFloat32) WriteColumn ¶ added in v0.63.0
func (c ColFloat32) WriteColumn(w *Writer)
type ColFloat64 ¶
type ColFloat64 []float64
ColFloat64 represents Float64 column.
func (*ColFloat64) AppendArr ¶
func (c *ColFloat64) AppendArr(vs []float64)
Append float64 slice to column.
func (*ColFloat64) Array ¶
func (c *ColFloat64) Array() *ColArr[float64]
Array is helper that creates Array of float64.
func (*ColFloat64) DecodeColumn ¶
func (c *ColFloat64) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes Float64 rows from *Reader.
func (ColFloat64) EncodeColumn ¶
func (c ColFloat64) EncodeColumn(b *Buffer)
EncodeColumn encodes Float64 rows to *Buffer.
func (*ColFloat64) LowCardinality ¶
func (c *ColFloat64) LowCardinality() *ColLowCardinality[float64]
LowCardinality returns LowCardinality for Float64.
func (*ColFloat64) Nullable ¶ added in v0.41.0
func (c *ColFloat64) Nullable() *ColNullable[float64]
Nullable is helper that creates Nullable(float64).
func (*ColFloat64) Reset ¶
func (c *ColFloat64) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColFloat64) WriteColumn ¶ added in v0.63.0
func (c ColFloat64) WriteColumn(w *Writer)
type ColIPv4 ¶
type ColIPv4 []IPv4
ColIPv4 represents IPv4 column.
func (*ColIPv4) DecodeColumn ¶
DecodeColumn decodes IPv4 rows from *Reader.
func (ColIPv4) EncodeColumn ¶
EncodeColumn encodes IPv4 rows to *Buffer.
func (*ColIPv4) LowCardinality ¶
func (c *ColIPv4) LowCardinality() *ColLowCardinality[IPv4]
LowCardinality returns LowCardinality for IPv4.
func (*ColIPv4) Nullable ¶ added in v0.41.0
func (c *ColIPv4) Nullable() *ColNullable[IPv4]
Nullable is helper that creates Nullable(IPv4).
func (*ColIPv4) Reset ¶
func (c *ColIPv4) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColIPv4) WriteColumn ¶ added in v0.63.0
type ColIPv6 ¶
type ColIPv6 []IPv6
ColIPv6 represents IPv6 column.
func (*ColIPv6) DecodeColumn ¶
DecodeColumn decodes IPv6 rows from *Reader.
func (ColIPv6) EncodeColumn ¶
EncodeColumn encodes IPv6 rows to *Buffer.
func (*ColIPv6) LowCardinality ¶
func (c *ColIPv6) LowCardinality() *ColLowCardinality[IPv6]
LowCardinality returns LowCardinality for IPv6.
func (*ColIPv6) Nullable ¶ added in v0.41.0
func (c *ColIPv6) Nullable() *ColNullable[IPv6]
Nullable is helper that creates Nullable(IPv6).
func (*ColIPv6) Reset ¶
func (c *ColIPv6) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColIPv6) WriteColumn ¶ added in v0.63.0
type ColInfo ¶
type ColInfo struct { Name string Type ColumnType }
ColInfo wraps Name and Type of column.
type ColInfoInput ¶
type ColInfoInput []ColInfo
ColInfoInput saves column info on decoding.
func (*ColInfoInput) DecodeResult ¶
func (s *ColInfoInput) DecodeResult(r *Reader, version int, b Block) error
func (*ColInfoInput) Reset ¶
func (s *ColInfoInput) Reset()
type ColInput ¶
type ColInput interface { Type() ColumnType Rows() int EncodeColumn(b *Buffer) WriteColumn(w *Writer) }
ColInput column.
type ColInt128 ¶
type ColInt128 []Int128
ColInt128 represents Int128 column.
func (*ColInt128) DecodeColumn ¶
DecodeColumn decodes Int128 rows from *Reader.
func (ColInt128) EncodeColumn ¶
EncodeColumn encodes Int128 rows to *Buffer.
func (*ColInt128) LowCardinality ¶
func (c *ColInt128) LowCardinality() *ColLowCardinality[Int128]
LowCardinality returns LowCardinality for Int128.
func (*ColInt128) Nullable ¶ added in v0.41.0
func (c *ColInt128) Nullable() *ColNullable[Int128]
Nullable is helper that creates Nullable(Int128).
func (*ColInt128) Reset ¶
func (c *ColInt128) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt128) WriteColumn ¶ added in v0.63.0
type ColInt16 ¶
type ColInt16 []int16
ColInt16 represents Int16 column.
func (*ColInt16) DecodeColumn ¶
DecodeColumn decodes Int16 rows from *Reader.
func (ColInt16) EncodeColumn ¶
EncodeColumn encodes Int16 rows to *Buffer.
func (*ColInt16) LowCardinality ¶
func (c *ColInt16) LowCardinality() *ColLowCardinality[int16]
LowCardinality returns LowCardinality for Int16.
func (*ColInt16) Nullable ¶ added in v0.41.0
func (c *ColInt16) Nullable() *ColNullable[int16]
Nullable is helper that creates Nullable(int16).
func (*ColInt16) Reset ¶
func (c *ColInt16) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt16) WriteColumn ¶ added in v0.63.0
type ColInt256 ¶
type ColInt256 []Int256
ColInt256 represents Int256 column.
func (*ColInt256) DecodeColumn ¶
DecodeColumn decodes Int256 rows from *Reader.
func (ColInt256) EncodeColumn ¶
EncodeColumn encodes Int256 rows to *Buffer.
func (*ColInt256) LowCardinality ¶
func (c *ColInt256) LowCardinality() *ColLowCardinality[Int256]
LowCardinality returns LowCardinality for Int256.
func (*ColInt256) Nullable ¶ added in v0.41.0
func (c *ColInt256) Nullable() *ColNullable[Int256]
Nullable is helper that creates Nullable(Int256).
func (*ColInt256) Reset ¶
func (c *ColInt256) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt256) WriteColumn ¶ added in v0.63.0
type ColInt32 ¶
type ColInt32 []int32
ColInt32 represents Int32 column.
func (*ColInt32) DecodeColumn ¶
DecodeColumn decodes Int32 rows from *Reader.
func (ColInt32) EncodeColumn ¶
EncodeColumn encodes Int32 rows to *Buffer.
func (*ColInt32) LowCardinality ¶
func (c *ColInt32) LowCardinality() *ColLowCardinality[int32]
LowCardinality returns LowCardinality for Int32.
func (*ColInt32) Nullable ¶ added in v0.41.0
func (c *ColInt32) Nullable() *ColNullable[int32]
Nullable is helper that creates Nullable(int32).
func (*ColInt32) Reset ¶
func (c *ColInt32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt32) WriteColumn ¶ added in v0.63.0
type ColInt64 ¶
type ColInt64 []int64
ColInt64 represents Int64 column.
func (*ColInt64) DecodeColumn ¶
DecodeColumn decodes Int64 rows from *Reader.
func (ColInt64) EncodeColumn ¶
EncodeColumn encodes Int64 rows to *Buffer.
func (*ColInt64) LowCardinality ¶
func (c *ColInt64) LowCardinality() *ColLowCardinality[int64]
LowCardinality returns LowCardinality for Int64.
func (*ColInt64) Nullable ¶ added in v0.41.0
func (c *ColInt64) Nullable() *ColNullable[int64]
Nullable is helper that creates Nullable(int64).
func (*ColInt64) Reset ¶
func (c *ColInt64) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt64) WriteColumn ¶ added in v0.63.0
type ColInt8 ¶
type ColInt8 []int8
ColInt8 represents Int8 column.
func (*ColInt8) DecodeColumn ¶
DecodeColumn decodes Int8 rows from *Reader.
func (ColInt8) EncodeColumn ¶
EncodeColumn encodes Int8 rows to *Buffer.
func (*ColInt8) LowCardinality ¶
func (c *ColInt8) LowCardinality() *ColLowCardinality[int8]
LowCardinality returns LowCardinality for Int8.
func (*ColInt8) Nullable ¶ added in v0.41.0
func (c *ColInt8) Nullable() *ColNullable[int8]
Nullable is helper that creates Nullable(int8).
func (*ColInt8) Reset ¶
func (c *ColInt8) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColInt8) WriteColumn ¶ added in v0.63.0
type ColInterval ¶ added in v0.45.0
type ColInterval struct { Scale IntervalScale Values ColInt64 }
func (*ColInterval) Append ¶ added in v0.45.0
func (c *ColInterval) Append(v Interval)
func (*ColInterval) DecodeColumn ¶ added in v0.45.0
func (c *ColInterval) DecodeColumn(r *Reader, rows int) error
func (ColInterval) EncodeColumn ¶ added in v0.45.0
func (c ColInterval) EncodeColumn(b *Buffer)
func (*ColInterval) Infer ¶ added in v0.45.0
func (c *ColInterval) Infer(t ColumnType) error
func (*ColInterval) Reset ¶ added in v0.45.0
func (c *ColInterval) Reset()
func (ColInterval) Row ¶ added in v0.45.0
func (c ColInterval) Row(i int) Interval
func (ColInterval) Rows ¶ added in v0.45.0
func (c ColInterval) Rows() int
func (ColInterval) Type ¶ added in v0.45.0
func (c ColInterval) Type() ColumnType
func (ColInterval) WriteColumn ¶ added in v0.63.0
func (c ColInterval) WriteColumn(w *Writer)
type ColJSONBytes ¶ added in v0.64.0
type ColJSONBytes struct {
ColJSONStr
}
ColJSONBytes is ColJSONStr wrapper to be ColumnOf for []byte.
func (*ColJSONBytes) Append ¶ added in v0.64.0
func (c *ColJSONBytes) Append(v []byte)
Append byte slice to column.
func (*ColJSONBytes) AppendArr ¶ added in v0.64.0
func (c *ColJSONBytes) AppendArr(v [][]byte)
AppendArr append slice of byte slices to column.
func (*ColJSONBytes) Array ¶ added in v0.64.0
func (c *ColJSONBytes) Array() *ColArr[[]byte]
Array is helper that creates Array(JSON).
func (*ColJSONBytes) Nullable ¶ added in v0.64.0
func (c *ColJSONBytes) Nullable() *ColNullable[[]byte]
Nullable is helper that creates Nullable(JSON).
func (ColJSONBytes) Row ¶ added in v0.64.0
func (c ColJSONBytes) Row(i int) []byte
Row returns row with number i.
type ColJSONStr ¶ added in v0.64.0
type ColJSONStr struct {
// contains filtered or unexported fields
}
ColJSONStr represents String column.
Use ColJSONBytes for []bytes ColumnOf implementation.
func (*ColJSONStr) Append ¶ added in v0.64.0
func (c *ColJSONStr) Append(v string)
Append string to column.
func (*ColJSONStr) AppendArr ¶ added in v0.64.0
func (c *ColJSONStr) AppendArr(v []string)
func (*ColJSONStr) AppendBytes ¶ added in v0.64.0
func (c *ColJSONStr) AppendBytes(v []byte)
AppendBytes append byte slice as string to column.
func (*ColJSONStr) Array ¶ added in v0.64.0
func (c *ColJSONStr) Array() *ColArr[string]
Array is helper that creates Array(JSON).
func (*ColJSONStr) DecodeColumn ¶ added in v0.64.0
func (c *ColJSONStr) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes String rows from *Reader.
func (ColJSONStr) EncodeColumn ¶ added in v0.64.0
func (c ColJSONStr) EncodeColumn(b *Buffer)
EncodeColumn encodes String rows to *Buffer.
func (ColJSONStr) First ¶ added in v0.64.0
func (c ColJSONStr) First() string
First returns the first row of the column.
func (ColJSONStr) ForEach ¶ added in v0.64.0
func (c ColJSONStr) ForEach(f func(i int, s string) error) error
ForEach calls f on each string from column.
func (ColJSONStr) ForEachBytes ¶ added in v0.64.0
func (c ColJSONStr) ForEachBytes(f func(i int, b []byte) error) error
ForEachBytes calls f on each string from column as byte slice.
func (*ColJSONStr) LowCardinality ¶ added in v0.64.0
func (c *ColJSONStr) LowCardinality() *ColLowCardinality[string]
LowCardinality returns LowCardinality(JSON).
func (*ColJSONStr) Nullable ¶ added in v0.64.0
func (c *ColJSONStr) Nullable() *ColNullable[string]
Nullable is helper that creates Nullable(JSON).
func (*ColJSONStr) Reset ¶ added in v0.64.0
func (c *ColJSONStr) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColJSONStr) Row ¶ added in v0.64.0
func (c ColJSONStr) Row(i int) string
Row returns row with number i.
func (ColJSONStr) RowBytes ¶ added in v0.64.0
func (c ColJSONStr) RowBytes(i int) []byte
RowBytes returns row with number i as byte slice.
func (ColJSONStr) Rows ¶ added in v0.64.0
func (c ColJSONStr) Rows() int
Rows returns count of rows in column.
func (ColJSONStr) Type ¶ added in v0.64.0
func (ColJSONStr) Type() ColumnType
Type returns ColumnType of JSON.
func (ColJSONStr) WriteColumn ¶ added in v0.64.0
func (c ColJSONStr) WriteColumn(w *Writer)
WriteColumn writes JSON rows to *Writer.
type ColLowCardinality ¶
type ColLowCardinality[T comparable] struct { Values []T // contains filtered or unexported fields }
ColLowCardinality is generic LowCardinality(T) column.
ColLowCardinality contains index and keys columns.
Index (i.e. dictionary) column contains unique values, Keys column contains sequence of indexes in Index column that represent actual values.
For example, ["Eko", "Eko", "Amadela", "Amadela", "Amadela", "Amadela"] can be encoded as:
Index: ["Eko", "Amadela"] (String) Keys: [0, 0, 1, 1, 1, 1] (UInt8)
The CardinalityKey is chosen depending on Index size, i.e. maximum value of chosen type should be able to represent any index of Index element.
func NewLowCardinality ¶ added in v0.41.0
func NewLowCardinality[T comparable](c ColumnOf[T]) *ColLowCardinality[T]
NewLowCardinality creates new LowCardinality column from another column for T.
func (*ColLowCardinality[T]) Append ¶ added in v0.41.0
func (c *ColLowCardinality[T]) Append(v T)
Append value to column.
func (*ColLowCardinality[T]) AppendArr ¶ added in v0.41.0
func (c *ColLowCardinality[T]) AppendArr(v []T)
AppendArr appends slice to column.
func (*ColLowCardinality[T]) Array ¶ added in v0.41.0
func (c *ColLowCardinality[T]) Array() *ColArr[T]
Array is helper that creates Array(ColLowCardinality(T)).
func (*ColLowCardinality[T]) DecodeColumn ¶
func (c *ColLowCardinality[T]) DecodeColumn(r *Reader, rows int) error
func (*ColLowCardinality[T]) DecodeState ¶
func (c *ColLowCardinality[T]) DecodeState(r *Reader) error
DecodeState implements StateDecoder, ensuring state for index column.
func (*ColLowCardinality[T]) EncodeColumn ¶
func (c *ColLowCardinality[T]) EncodeColumn(b *Buffer)
func (ColLowCardinality[T]) EncodeState ¶
func (c ColLowCardinality[T]) EncodeState(b *Buffer)
EncodeState implements StateEncoder, ensuring state for index column.
func (*ColLowCardinality[T]) Prepare ¶ added in v0.41.0
func (c *ColLowCardinality[T]) Prepare() error
Prepare column for ingestion.
func (*ColLowCardinality[T]) Reset ¶
func (c *ColLowCardinality[T]) Reset()
func (ColLowCardinality[T]) Row ¶ added in v0.41.0
func (c ColLowCardinality[T]) Row(i int) T
Row returns i-th row.
func (ColLowCardinality[T]) Rows ¶
func (c ColLowCardinality[T]) Rows() int
Rows returns rows count.
func (ColLowCardinality[T]) Type ¶
func (c ColLowCardinality[T]) Type() ColumnType
func (*ColLowCardinality[T]) WriteColumn ¶ added in v0.63.0
func (c *ColLowCardinality[T]) WriteColumn(w *Writer)
type ColLowCardinalityRaw ¶ added in v0.49.0
type ColLowCardinalityRaw struct { Index Column // dictionary Key CardinalityKey Keys8 ColUInt8 Keys16 ColUInt16 Keys32 ColUInt32 Keys64 ColUInt64 }
ColLowCardinalityRaw is non-generic version of ColLowCardinality.
func (*ColLowCardinalityRaw) AppendKey ¶ added in v0.49.0
func (c *ColLowCardinalityRaw) AppendKey(i int)
func (*ColLowCardinalityRaw) DecodeColumn ¶ added in v0.49.0
func (c *ColLowCardinalityRaw) DecodeColumn(r *Reader, rows int) error
func (*ColLowCardinalityRaw) DecodeState ¶ added in v0.49.0
func (c *ColLowCardinalityRaw) DecodeState(r *Reader) error
func (ColLowCardinalityRaw) EncodeColumn ¶ added in v0.49.0
func (c ColLowCardinalityRaw) EncodeColumn(b *Buffer)
func (ColLowCardinalityRaw) EncodeState ¶ added in v0.49.0
func (c ColLowCardinalityRaw) EncodeState(b *Buffer)
func (*ColLowCardinalityRaw) Keys ¶ added in v0.49.0
func (c *ColLowCardinalityRaw) Keys() Column
func (*ColLowCardinalityRaw) Reset ¶ added in v0.49.0
func (c *ColLowCardinalityRaw) Reset()
func (ColLowCardinalityRaw) Rows ¶ added in v0.49.0
func (c ColLowCardinalityRaw) Rows() int
func (ColLowCardinalityRaw) Type ¶ added in v0.49.0
func (c ColLowCardinalityRaw) Type() ColumnType
func (ColLowCardinalityRaw) WriteColumn ¶ added in v0.63.0
func (c ColLowCardinalityRaw) WriteColumn(w *Writer)
type ColMap ¶
type ColMap[K comparable, V any] struct { Offsets ColUInt64 Keys ColumnOf[K] Values ColumnOf[V] }
ColMap implements Map(K, V) as ColumnOf[map[K]V].
func NewMap ¶ added in v0.41.0
func NewMap[K comparable, V any](k ColumnOf[K], v ColumnOf[V]) *ColMap[K, V]
NewMap constructs Map(K, V).
func (*ColMap[K, V]) AppendKV ¶ added in v0.57.0
AppendKV is a convenience method for appending a slice of KV[K, V].
func (*ColMap[K, V]) DecodeState ¶
func (ColMap[K, V]) EncodeColumn ¶
func (ColMap[K, V]) EncodeState ¶
func (*ColMap[K, V]) Infer ¶ added in v0.57.0
func (c *ColMap[K, V]) Infer(t ColumnType) error
Infer ensures Inferable column propagation.
func (ColMap[K, V]) RowRange ¶ added in v0.63.0
RowRange returns a iter.Seq2 iterator over i-th row.
func (ColMap[K, V]) Type ¶
func (c ColMap[K, V]) Type() ColumnType
func (ColMap[K, V]) WriteColumn ¶ added in v0.63.0
type ColNamed ¶ added in v0.42.0
ColNamed is named column. Used in named tuples.
func (ColNamed[T]) ColumnName ¶ added in v0.42.0
func (ColNamed[T]) DecodeState ¶ added in v0.42.0
func (ColNamed[T]) EncodeState ¶ added in v0.42.0
func (*ColNamed[T]) Infer ¶ added in v0.42.0
func (c *ColNamed[T]) Infer(t ColumnType) error
func (ColNamed[T]) Type ¶ added in v0.42.0
func (c ColNamed[T]) Type() ColumnType
type ColNothing ¶ added in v0.45.0
type ColNothing int
ColNothing represents column of null values. Value is row count.
https://clickhouse.com/docs/ru/sql-reference/data-types/special-data-types/nothing
func (*ColNothing) Append ¶ added in v0.45.0
func (c *ColNothing) Append(_ Nothing)
func (*ColNothing) AppendArr ¶ added in v0.55.0
func (c *ColNothing) AppendArr(vs []Nothing)
func (*ColNothing) Array ¶ added in v0.45.0
func (c *ColNothing) Array() *ColArr[Nothing]
func (*ColNothing) DecodeColumn ¶ added in v0.45.0
func (c *ColNothing) DecodeColumn(r *Reader, rows int) error
func (ColNothing) EncodeColumn ¶ added in v0.45.0
func (c ColNothing) EncodeColumn(b *Buffer)
func (*ColNothing) Nullable ¶ added in v0.45.0
func (c *ColNothing) Nullable() *ColNullable[Nothing]
func (*ColNothing) Reset ¶ added in v0.45.0
func (c *ColNothing) Reset()
func (ColNothing) Row ¶ added in v0.45.0
func (c ColNothing) Row(i int) Nothing
func (ColNothing) Rows ¶ added in v0.45.0
func (c ColNothing) Rows() int
func (ColNothing) Type ¶ added in v0.45.0
func (c ColNothing) Type() ColumnType
func (ColNothing) WriteColumn ¶ added in v0.63.0
func (c ColNothing) WriteColumn(w *Writer)
type ColNullable ¶
ColNullable represents Nullable(T) column.
Nulls is nullable "mask" on Values column. For example, to encode [null, "", "hello", null, "world"]
Values: ["", "", "hello", "", "world"] (len: 5) Nulls: [ 1, 0, 0, 1, 0] (len: 5)
Values and Nulls row counts are always equal.
func NewColNullable ¶ added in v0.41.0
func NewColNullable[T any](v ColumnOf[T]) *ColNullable[T]
NewColNullable returns new Nullable(T) from v column.
func (*ColNullable[T]) Append ¶ added in v0.41.0
func (c *ColNullable[T]) Append(v Nullable[T])
func (*ColNullable[T]) AppendArr ¶ added in v0.41.0
func (c *ColNullable[T]) AppendArr(v []Nullable[T])
func (*ColNullable[T]) Array ¶ added in v0.63.0
func (c *ColNullable[T]) Array() *ColArr[Nullable[T]]
func (*ColNullable[T]) DecodeColumn ¶
func (c *ColNullable[T]) DecodeColumn(r *Reader, rows int) error
func (*ColNullable[T]) DecodeState ¶ added in v0.41.0
func (c *ColNullable[T]) DecodeState(r *Reader) error
func (ColNullable[T]) EncodeColumn ¶
func (c ColNullable[T]) EncodeColumn(b *Buffer)
func (ColNullable[T]) EncodeState ¶ added in v0.41.0
func (c ColNullable[T]) EncodeState(b *Buffer)
func (ColNullable[T]) IsElemNull ¶
func (c ColNullable[T]) IsElemNull(i int) bool
func (*ColNullable[T]) Reset ¶
func (c *ColNullable[T]) Reset()
func (ColNullable[T]) Row ¶ added in v0.41.0
func (c ColNullable[T]) Row(i int) Nullable[T]
func (ColNullable[T]) Rows ¶
func (c ColNullable[T]) Rows() int
func (ColNullable[T]) Type ¶
func (c ColNullable[T]) Type() ColumnType
func (ColNullable[T]) WriteColumn ¶ added in v0.63.0
func (c ColNullable[T]) WriteColumn(w *Writer)
type ColPoint ¶
type ColPoint struct {
X, Y ColFloat64
}
func (ColPoint) EncodeColumn ¶
func (ColPoint) Type ¶
func (c ColPoint) Type() ColumnType
func (ColPoint) WriteColumn ¶ added in v0.63.0
type ColRaw ¶
type ColRaw struct { T ColumnType // type of column Size int // size of single value Data []byte // raw value of column Count int // count of rows }
ColRaw is Column that performs zero decoding or encoding. T, Size are required.
TODO: support strings and T, Size inference.
Useful for copying from one source to another.
func (ColRaw) EncodeColumn ¶
func (ColRaw) Type ¶
func (c ColRaw) Type() ColumnType
type ColRawOf ¶
type ColRawOf[X comparable] []X
ColRawOf is generic raw column.
func (*ColRawOf[X]) DecodeColumn ¶
DecodeColumn decodes ColRawOf rows from *Reader.
func (ColRawOf[X]) EncodeColumn ¶
EncodeColumn encodes ColRawOf rows to *Buffer.
func (*ColRawOf[X]) Reset ¶
func (c *ColRawOf[X]) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColRawOf[X]) Type ¶
func (c ColRawOf[X]) Type() ColumnType
Type returns ColumnType of ColRawOf.
func (ColRawOf[X]) WriteColumn ¶ added in v0.63.0
WriteColumn write ColRawOf rows to *Writer.
type ColResult ¶
type ColResult interface { Type() ColumnType Rows() int DecodeColumn(r *Reader, rows int) error Resettable }
ColResult column.
type ColStr ¶
ColStr represents String column.
Use ColBytes for []bytes ColumnOf implementation.
func (*ColStr) AppendBytes ¶
AppendBytes append byte slice as string to column.
func (*ColStr) DecodeColumn ¶
DecodeColumn decodes String rows from *Reader.
func (ColStr) EncodeColumn ¶
EncodeColumn encodes String rows to *Buffer.
func (ColStr) ForEachBytes ¶
ForEachBytes calls f on each string from column as byte slice.
func (*ColStr) LowCardinality ¶
func (c *ColStr) LowCardinality() *ColLowCardinality[string]
LowCardinality returns LowCardinality(String).
func (*ColStr) Nullable ¶ added in v0.41.0
func (c *ColStr) Nullable() *ColNullable[string]
Nullable is helper that creates Nullable(String).
func (*ColStr) Reset ¶
func (c *ColStr) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColStr) WriteColumn ¶ added in v0.63.0
WriteColumn writes String rows to *Writer.
type ColTuple ¶
type ColTuple []Column
ColTuple is Tuple column.
Basically it is just a group of columns.
func (ColTuple) DecodeState ¶
func (ColTuple) EncodeColumn ¶
func (ColTuple) EncodeState ¶
func (ColTuple) Infer ¶ added in v0.42.0
func (c ColTuple) Infer(t ColumnType) error
func (ColTuple) Type ¶
func (c ColTuple) Type() ColumnType
func (ColTuple) WriteColumn ¶ added in v0.63.0
type ColUInt128 ¶
type ColUInt128 []UInt128
ColUInt128 represents UInt128 column.
func (*ColUInt128) AppendArr ¶
func (c *ColUInt128) AppendArr(vs []UInt128)
Append UInt128 slice to column.
func (*ColUInt128) Array ¶
func (c *ColUInt128) Array() *ColArr[UInt128]
Array is helper that creates Array of UInt128.
func (*ColUInt128) DecodeColumn ¶
func (c *ColUInt128) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes UInt128 rows from *Reader.
func (ColUInt128) EncodeColumn ¶
func (c ColUInt128) EncodeColumn(b *Buffer)
EncodeColumn encodes UInt128 rows to *Buffer.
func (*ColUInt128) LowCardinality ¶
func (c *ColUInt128) LowCardinality() *ColLowCardinality[UInt128]
LowCardinality returns LowCardinality for UInt128.
func (*ColUInt128) Nullable ¶ added in v0.41.0
func (c *ColUInt128) Nullable() *ColNullable[UInt128]
Nullable is helper that creates Nullable(UInt128).
func (*ColUInt128) Reset ¶
func (c *ColUInt128) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt128) WriteColumn ¶ added in v0.63.0
func (c ColUInt128) WriteColumn(w *Writer)
type ColUInt16 ¶
type ColUInt16 []uint16
ColUInt16 represents UInt16 column.
func (*ColUInt16) DecodeColumn ¶
DecodeColumn decodes UInt16 rows from *Reader.
func (ColUInt16) EncodeColumn ¶
EncodeColumn encodes UInt16 rows to *Buffer.
func (*ColUInt16) LowCardinality ¶
func (c *ColUInt16) LowCardinality() *ColLowCardinality[uint16]
LowCardinality returns LowCardinality for UInt16.
func (*ColUInt16) Nullable ¶ added in v0.41.0
func (c *ColUInt16) Nullable() *ColNullable[uint16]
Nullable is helper that creates Nullable(uint16).
func (*ColUInt16) Reset ¶
func (c *ColUInt16) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt16) WriteColumn ¶ added in v0.63.0
type ColUInt256 ¶
type ColUInt256 []UInt256
ColUInt256 represents UInt256 column.
func (*ColUInt256) AppendArr ¶
func (c *ColUInt256) AppendArr(vs []UInt256)
Append UInt256 slice to column.
func (*ColUInt256) Array ¶
func (c *ColUInt256) Array() *ColArr[UInt256]
Array is helper that creates Array of UInt256.
func (*ColUInt256) DecodeColumn ¶
func (c *ColUInt256) DecodeColumn(r *Reader, rows int) error
DecodeColumn decodes UInt256 rows from *Reader.
func (ColUInt256) EncodeColumn ¶
func (c ColUInt256) EncodeColumn(b *Buffer)
EncodeColumn encodes UInt256 rows to *Buffer.
func (*ColUInt256) LowCardinality ¶
func (c *ColUInt256) LowCardinality() *ColLowCardinality[UInt256]
LowCardinality returns LowCardinality for UInt256.
func (*ColUInt256) Nullable ¶ added in v0.41.0
func (c *ColUInt256) Nullable() *ColNullable[UInt256]
Nullable is helper that creates Nullable(UInt256).
func (*ColUInt256) Reset ¶
func (c *ColUInt256) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt256) WriteColumn ¶ added in v0.63.0
func (c ColUInt256) WriteColumn(w *Writer)
type ColUInt32 ¶
type ColUInt32 []uint32
ColUInt32 represents UInt32 column.
func (*ColUInt32) DecodeColumn ¶
DecodeColumn decodes UInt32 rows from *Reader.
func (ColUInt32) EncodeColumn ¶
EncodeColumn encodes UInt32 rows to *Buffer.
func (*ColUInt32) LowCardinality ¶
func (c *ColUInt32) LowCardinality() *ColLowCardinality[uint32]
LowCardinality returns LowCardinality for UInt32.
func (*ColUInt32) Nullable ¶ added in v0.41.0
func (c *ColUInt32) Nullable() *ColNullable[uint32]
Nullable is helper that creates Nullable(uint32).
func (*ColUInt32) Reset ¶
func (c *ColUInt32) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt32) WriteColumn ¶ added in v0.63.0
type ColUInt64 ¶
type ColUInt64 []uint64
ColUInt64 represents UInt64 column.
func (*ColUInt64) DecodeColumn ¶
DecodeColumn decodes UInt64 rows from *Reader.
func (ColUInt64) EncodeColumn ¶
EncodeColumn encodes UInt64 rows to *Buffer.
func (*ColUInt64) LowCardinality ¶
func (c *ColUInt64) LowCardinality() *ColLowCardinality[uint64]
LowCardinality returns LowCardinality for UInt64.
func (*ColUInt64) Nullable ¶ added in v0.41.0
func (c *ColUInt64) Nullable() *ColNullable[uint64]
Nullable is helper that creates Nullable(uint64).
func (*ColUInt64) Reset ¶
func (c *ColUInt64) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt64) WriteColumn ¶ added in v0.63.0
type ColUInt8 ¶
type ColUInt8 []uint8
ColUInt8 represents UInt8 column.
func (*ColUInt8) DecodeColumn ¶
DecodeColumn decodes UInt8 rows from *Reader.
func (ColUInt8) EncodeColumn ¶
EncodeColumn encodes UInt8 rows to *Buffer.
func (*ColUInt8) LowCardinality ¶
func (c *ColUInt8) LowCardinality() *ColLowCardinality[uint8]
LowCardinality returns LowCardinality for UInt8.
func (*ColUInt8) Nullable ¶ added in v0.41.0
func (c *ColUInt8) Nullable() *ColNullable[uint8]
Nullable is helper that creates Nullable(uint8).
func (*ColUInt8) Reset ¶
func (c *ColUInt8) Reset()
Reset resets data in row, preserving capacity for efficiency.
func (ColUInt8) WriteColumn ¶ added in v0.63.0
type ColUUID ¶
ColUUID is UUID column.
func (ColUUID) EncodeColumn ¶
EncodeColumn encodes ColUUID rows to *Buffer.
func (*ColUUID) Nullable ¶ added in v0.57.0
func (c *ColUUID) Nullable() *ColNullable[uuid.UUID]
Nullable is helper that creates Nullable(uuid.UUID).
func (ColUUID) Type ¶
func (c ColUUID) Type() ColumnType
func (ColUUID) WriteColumn ¶ added in v0.63.0
WriteColumn encodes ColUUID rows to *Writer.
type Column ¶
func Alias ¶
func Alias(c Column, t ColumnType) Column
Alias column as other type.
E.g. Bool is domain of UInt8, so can be aliased from UInt8.
type ColumnType ¶
type ColumnType string
ColumnType is type of column element.
const ( ColumnTypeNone ColumnType = "" ColumnTypeInt8 ColumnType = "Int8" ColumnTypeInt16 ColumnType = "Int16" ColumnTypeInt32 ColumnType = "Int32" ColumnTypeInt64 ColumnType = "Int64" ColumnTypeInt128 ColumnType = "Int128" ColumnTypeInt256 ColumnType = "Int256" ColumnTypeUInt8 ColumnType = "UInt8" ColumnTypeUInt16 ColumnType = "UInt16" ColumnTypeUInt32 ColumnType = "UInt32" ColumnTypeUInt64 ColumnType = "UInt64" ColumnTypeUInt128 ColumnType = "UInt128" ColumnTypeUInt256 ColumnType = "UInt256" ColumnTypeFloat32 ColumnType = "Float32" ColumnTypeFloat64 ColumnType = "Float64" ColumnTypeString ColumnType = "String" ColumnTypeFixedString ColumnType = "FixedString" ColumnTypeArray ColumnType = "Array" ColumnTypeIPv4 ColumnType = "IPv4" ColumnTypeIPv6 ColumnType = "IPv6" ColumnTypeDateTime ColumnType = "DateTime" ColumnTypeDateTime64 ColumnType = "DateTime64" ColumnTypeDate ColumnType = "Date" ColumnTypeDate32 ColumnType = "Date32" ColumnTypeUUID ColumnType = "UUID" ColumnTypeEnum8 ColumnType = "Enum8" ColumnTypeEnum16 ColumnType = "Enum16" ColumnTypeLowCardinality ColumnType = "LowCardinality" ColumnTypeMap ColumnType = "Map" ColumnTypeBool ColumnType = "Bool" ColumnTypeTuple ColumnType = "Tuple" ColumnTypeNullable ColumnType = "Nullable" ColumnTypeDecimal ColumnType = "Decimal" ColumnTypeDecimal32 ColumnType = "Decimal32" ColumnTypeDecimal64 ColumnType = "Decimal64" ColumnTypeDecimal128 ColumnType = "Decimal128" ColumnTypeDecimal256 ColumnType = "Decimal256" ColumnTypePoint ColumnType = "Point" ColumnTypeInterval ColumnType = "Interval" ColumnTypeNothing ColumnType = "Nothing" ColumnTypeJSON ColumnType = "JSON" )
Common colum type names. Does not represent full set of supported types, because ColumnTypeArray is composable; actual type is composite.
For example: Array(Int8) or even Array(Array(String)).
func (ColumnType) Base ¶
func (c ColumnType) Base() ColumnType
func (ColumnType) Conflicts ¶
func (c ColumnType) Conflicts(b ColumnType) bool
Conflicts reports whether two types conflict.
func (ColumnType) Elem ¶
func (c ColumnType) Elem() ColumnType
func (ColumnType) IsArray ¶
func (c ColumnType) IsArray() bool
IsArray reports whether ColumnType is composite.
func (ColumnType) String ¶
func (c ColumnType) String() string
func (ColumnType) Sub ¶
func (c ColumnType) Sub(subtypes ...ColumnType) ColumnType
Sub of T returns T(A, B, ...).
func (ColumnType) With ¶
func (c ColumnType) With(params ...string) ColumnType
With returns ColumnType(p1, p2, ...) from ColumnType.
type Compression ¶
type Compression byte
Compression status.
const ( CompressionDisabled Compression = 0 CompressionEnabled Compression = 1 )
Compression statuses.
func CompressionString ¶
func CompressionString(s string) (Compression, error)
CompressionString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func CompressionValues ¶
func CompressionValues() []Compression
CompressionValues returns all values of the enum
func (Compression) IsACompression ¶
func (i Compression) IsACompression() bool
IsACompression returns "true" if the value is listed in the enum definition. "false" otherwise
func (Compression) String ¶
func (i Compression) String() string
type Date ¶
type Date uint16
Date represents Date value.
https://clickhouse.com/docs/en/sql-reference/data-types/date/
type Date32 ¶
type Date32 int32
Date32 represents Date32 value.
https://clickhouse.com/docs/en/sql-reference/data-types/date32/
type DateTime64 ¶
type DateTime64 int64
DateTime64 represents DateTime64 type.
See https://clickhouse.com/docs/en/sql-reference/data-types/datetime64/.
func ToDateTime64 ¶
func ToDateTime64(t time.Time, p Precision) DateTime64
ToDateTime64 converts time.Time to DateTime64.
type Enum16 ¶
type Enum16 int16
Enum16 represents raw Enum16 value.
Actual values should be taken from DDL.
type Enum8 ¶
type Enum8 int8
Enum8 represents raw Enum8 value.
Actual values should be taken from DDL.
type Error ¶
type Error int
Error on server side.
const ( ErrUnsupportedMethod Error = 1 ErrUnsupportedParameter Error = 2 ErrUnexpectedEndOfFile Error = 3 ErrExpectedEndOfFile Error = 4 ErrCannotParseText Error = 6 ErrIncorrectNumberOfColumns Error = 7 ErrThereIsNoColumn Error = 8 ErrSizesOfColumnsDoesntMatch Error = 9 ErrNotFoundColumnInBlock Error = 10 ErrPositionOutOfBound Error = 11 ErrParameterOutOfBound Error = 12 ErrSizesOfColumnsInTupleDoesntMatch Error = 13 ErrDuplicateColumn Error = 15 ErrNoSuchColumnInTable Error = 16 ErrDelimiterInStringLiteralDoesntMatch Error = 17 ErrCannotInsertElementIntoConstantColumn Error = 18 ErrSizeOfFixedStringDoesntMatch Error = 19 ErrNumberOfColumnsDoesntMatch Error = 20 ErrCannotReadAllDataFromTabSeparatedInput Error = 21 ErrCannotParseAllValueFromTabSeparatedInput Error = 22 ErrCannotReadFromIstream Error = 23 ErrCannotWriteToOstream Error = 24 ErrCannotParseEscapeSequence Error = 25 ErrCannotParseQuotedString Error = 26 ErrCannotParseInputAssertionFailed Error = 27 ErrCannotPrintFloatOrDoubleNumber Error = 28 ErrCannotPrintInteger Error = 29 ErrCannotReadSizeOfCompressedChunk Error = 30 ErrCannotReadCompressedChunk Error = 31 ErrAttemptToReadAfterEOF Error = 32 ErrCannotReadAllData Error = 33 ErrTooManyArgumentsForFunction Error = 34 ErrTooLessArgumentsForFunction Error = 35 ErrBadArguments Error = 36 ErrUnknownElementInAst Error = 37 ErrCannotParseDate Error = 38 ErrTooLargeSizeCompressed Error = 39 ErrChecksumDoesntMatch Error = 40 ErrCannotParseDatetime Error = 41 ErrNumberOfArgumentsDoesntMatch Error = 42 ErrIllegalTypeOfArgument Error = 43 ErrIllegalColumn Error = 44 ErrIllegalNumberOfResultColumns Error = 45 ErrUnknownFunction Error = 46 ErrUnknownIdentifier Error = 47 ErrNotImplemented Error = 48 ErrLogicalError Error = 49 ErrUnknownType Error = 50 ErrEmptyListOfColumnsQueried Error = 51 ErrColumnQueriedMoreThanOnce Error = 52 ErrTypeMismatch Error = 53 ErrStorageDoesntAllowParameters Error = 54 ErrStorageRequiresParameter Error = 55 ErrUnknownStorage Error = 56 ErrTableAlreadyExists Error = 57 ErrTableMetadataAlreadyExists Error = 58 ErrIllegalTypeOfColumnForFilter Error = 59 ErrUnknownTable Error = 60 ErrOnlyFilterColumnInBlock Error = 61 ErrSyntaxError Error = 62 ErrUnknownAggregateFunction Error = 63 ErrCannotReadAggregateFunctionFromText Error = 64 ErrCannotWriteAggregateFunctionAsText Error = 65 ErrNotAColumn Error = 66 ErrIllegalKeyOfAggregation Error = 67 ErrCannotGetSizeOfField Error = 68 ErrArgumentOutOfBound Error = 69 ErrCannotConvertType Error = 70 ErrCannotWriteAfterEndOfBuffer Error = 71 ErrCannotParseNumber Error = 72 ErrUnknownFormat Error = 73 ErrCannotReadFromFileDescriptor Error = 74 ErrCannotWriteToFileDescriptor Error = 75 ErrCannotOpenFile Error = 76 ErrCannotCloseFile Error = 77 ErrUnknownTypeOfQuery Error = 78 ErrIncorrectFileName Error = 79 ErrIncorrectQuery Error = 80 ErrUnknownDatabase Error = 81 ErrDatabaseAlreadyExists Error = 82 ErrDirectoryDoesntExist Error = 83 ErrDirectoryAlreadyExists Error = 84 ErrFormatIsNotSuitableForInput Error = 85 ErrReceivedErrorFromRemoteIoServer Error = 86 ErrCannotSeekThroughFile Error = 87 ErrCannotTruncateFile Error = 88 ErrUnknownCompressionMethod Error = 89 ErrEmptyListOfColumnsPassed Error = 90 ErrSizesOfMarksFilesAreInconsistent Error = 91 ErrEmptyDataPassed Error = 92 ErrUnknownAggregatedDataVariant Error = 93 ErrCannotMergeDifferentAggregatedDataVariants Error = 94 ErrCannotReadFromSocket Error = 95 ErrCannotWriteToSocket Error = 96 ErrCannotReadAllDataFromChunkedInput Error = 97 ErrCannotWriteToEmptyBlockOutputStream Error = 98 ErrUnknownPacketFromClient Error = 99 ErrUnknownPacketFromServer Error = 100 ErrUnexpectedPacketFromClient Error = 101 ErrUnexpectedPacketFromServer Error = 102 ErrReceivedDataForWrongQueryID Error = 103 ErrTooSmallBufferSize Error = 104 ErrCannotReadHistory Error = 105 ErrCannotAppendHistory Error = 106 ErrFileDoesntExist Error = 107 ErrNoDataToInsert Error = 108 ErrCannotBlockSignal Error = 109 ErrCannotUnblockSignal Error = 110 ErrCannotManipulateSigset Error = 111 ErrCannotWaitForSignal Error = 112 ErrThereIsNoSession Error = 113 ErrCannotClockGettime Error = 114 ErrUnknownSetting Error = 115 ErrThereIsNoDefaultValue Error = 116 ErrIncorrectData Error = 117 ErrEngineRequired Error = 119 ErrCannotInsertValueOfDifferentSizeIntoTuple Error = 120 ErrUnknownSetDataVariant Error = 121 ErrIncompatibleColumns Error = 122 ErrUnknownTypeOfAstNode Error = 123 ErrIncorrectElementOfSet Error = 124 ErrIncorrectResultOfScalarSubquery Error = 125 ErrCannotGetReturnType Error = 126 ErrIllegalIndex Error = 127 ErrTooLargeArraySize Error = 128 ErrFunctionIsSpecial Error = 129 ErrCannotReadArrayFromText Error = 130 ErrTooLargeStringSize Error = 131 ErrCannotCreateTableFromMetadata Error = 132 ErrAggregateFunctionDoesntAllowParameters Error = 133 ErrParametersToAggregateFunctionsMustBeLiterals Error = 134 ErrZeroArrayOrTupleIndex Error = 135 ErrUnknownElementInConfig Error = 137 ErrExcessiveElementInConfig Error = 138 ErrNoElementsInConfig Error = 139 ErrAllRequestedColumnsAreMissing Error = 140 ErrSamplingNotSupported Error = 141 ErrNotFoundNode Error = 142 ErrFoundMoreThanOneNode Error = 143 ErrFirstDateIsBiggerThanLastDate Error = 144 ErrUnknownOverflowMode Error = 145 ErrQuerySectionDoesntMakeSense Error = 146 ErrNotFoundFunctionElementForAggregate Error = 147 ErrNotFoundRelationElementForCondition Error = 148 ErrNotFoundRHSElementForCondition Error = 149 ErrNoAttributesListed Error = 150 ErrIndexOfColumnInSortClauseIsOutOfRange Error = 151 ErrUnknownDirectionOfSorting Error = 152 ErrIllegalDivision Error = 153 ErrAggregateFunctionNotApplicable Error = 154 ErrUnknownRelation Error = 155 ErrDictionariesWasNotLoaded Error = 156 ErrIllegalOverflowMode Error = 157 ErrTooManyRows Error = 158 ErrTimeoutExceeded Error = 159 ErrTooSlow Error = 160 ErrTooManyColumns Error = 161 ErrTooDeepSubqueries Error = 162 ErrTooDeepPipeline Error = 163 ErrReadonly Error = 164 ErrTooManyTemporaryColumns Error = 165 ErrTooManyTemporaryNonConstColumns Error = 166 ErrTooDeepAst Error = 167 ErrTooBigAst Error = 168 ErrBadTypeOfField Error = 169 ErrBadGet Error = 170 ErrBlocksHaveDifferentStructure Error = 171 ErrCannotCreateDirectory Error = 172 ErrCannotAllocateMemory Error = 173 ErrCyclicAliases Error = 174 ErrChunkNotFound Error = 176 ErrDuplicateChunkName Error = 177 ErrMultipleAliasesForExpression Error = 178 ErrMultipleExpressionsForAlias Error = 179 ErrThereIsNoProfile Error = 180 ErrIllegalFinal Error = 181 ErrIllegalPrewhere Error = 182 ErrUnexpectedExpression Error = 183 ErrIllegalAggregation Error = 184 ErrUnsupportedMyisamBlockType Error = 185 ErrUnsupportedCollationLocale Error = 186 ErrCollationComparisonFailed Error = 187 ErrUnknownAction Error = 188 ErrTableMustNotBeCreatedManually Error = 189 ErrSizesOfArraysDoesntMatch Error = 190 ErrSetSizeLimitExceeded Error = 191 ErrUnknownUser Error = 192 ErrWrongPassword Error = 193 ErrRequiredPassword Error = 194 ErrIPAddressNotAllowed Error = 195 ErrUnknownAddressPatternType Error = 196 ErrServerRevisionIsTooOld Error = 197 ErrDNSError Error = 198 ErrUnknownQuota Error = 199 ErrQuotaDoesntAllowKeys Error = 200 ErrQuotaExpired Error = 201 ErrTooManySimultaneousQueries Error = 202 ErrNoFreeConnection Error = 203 ErrCannotFsync Error = 204 ErrNestedTypeTooDeep Error = 205 ErrAliasRequired Error = 206 ErrAmbiguousIdentifier Error = 207 ErrEmptyNestedTable Error = 208 ErrSocketTimeout Error = 209 ErrNetworkError Error = 210 ErrEmptyQuery Error = 211 ErrUnknownLoadBalancing Error = 212 ErrUnknownTotalsMode Error = 213 ErrCannotStatvfs Error = 214 ErrNotAnAggregate Error = 215 ErrQueryWithSameIDIsAlreadyRunning Error = 216 ErrClientHasConnectedToWrongPort Error = 217 ErrTableIsDropped Error = 218 ErrDatabaseNotEmpty Error = 219 ErrDuplicateInterserverIoEndpoint Error = 220 ErrNoSuchInterserverIoEndpoint Error = 221 ErrAddingReplicaToNonEmptyTable Error = 222 ErrUnexpectedAstStructure Error = 223 ErrReplicaIsAlreadyActive Error = 224 ErrNoZookeeper Error = 225 ErrNoFileInDataPart Error = 226 ErrUnexpectedFileInDataPart Error = 227 ErrBadSizeOfFileInDataPart Error = 228 ErrQueryIsTooLarge Error = 229 ErrNotFoundExpectedDataPart Error = 230 ErrTooManyUnexpectedDataParts Error = 231 ErrNoSuchDataPart Error = 232 ErrBadDataPartName Error = 233 ErrNoReplicaHasPart Error = 234 ErrDuplicateDataPart Error = 235 ErrAborted Error = 236 ErrNoReplicaNameGiven Error = 237 ErrFormatVersionTooOld Error = 238 ErrCannotMunmap Error = 239 ErrCannotMremap Error = 240 ErrMemoryLimitExceeded Error = 241 ErrTableIsReadOnly Error = 242 ErrNotEnoughSpace Error = 243 ErrUnexpectedZookeeperError Error = 244 ErrCorruptedData Error = 246 ErrIncorrectMark Error = 247 ErrInvalidPartitionValue Error = 248 ErrNotEnoughBlockNumbers Error = 250 ErrNoSuchReplica Error = 251 ErrTooManyParts Error = 252 ErrReplicaIsAlreadyExist Error = 253 ErrNoActiveReplicas Error = 254 ErrTooManyRetriesToFetchParts Error = 255 ErrPartitionAlreadyExists Error = 256 ErrPartitionDoesntExist Error = 257 ErrUnionAllResultStructuresMismatch Error = 258 ErrClientOutputFormatSpecified Error = 260 ErrUnknownBlockInfoField Error = 261 ErrBadCollation Error = 262 ErrCannotCompileCode Error = 263 ErrIncompatibleTypeOfJoin Error = 264 ErrNoAvailableReplica Error = 265 ErrMismatchReplicasDataSources Error = 266 ErrStorageDoesntSupportParallelReplicas Error = 267 ErrCPUIDError Error = 268 ErrInfiniteLoop Error = 269 ErrCannotCompress Error = 270 ErrCannotDecompress Error = 271 ErrAioSubmitError Error = 272 ErrAioCompletionError Error = 273 ErrAioReadError Error = 274 ErrAioWriteError Error = 275 ErrIndexNotUsed Error = 277 ErrLeadershipLost Error = 278 ErrAllConnectionTriesFailed Error = 279 ErrNoAvailableData Error = 280 ErrDictionaryIsEmpty Error = 281 ErrIncorrectIndex Error = 282 ErrUnknownDistributedProductMode Error = 283 ErrUnknownGlobalSubqueriesMethod Error = 284 ErrTooLessLiveReplicas Error = 285 ErrUnsatisfiedQuorumForPreviousWrite Error = 286 ErrUnknownFormatVersion Error = 287 ErrDistributedInJoinSubqueryDenied Error = 288 ErrReplicaIsNotInQuorum Error = 289 ErrLimitExceeded Error = 290 ErrDatabaseAccessDenied Error = 291 ErrLeadershipChanged Error = 292 ErrMongodbCannotAuthenticate Error = 293 ErrInvalidBlockExtraInfo Error = 294 ErrReceivedEmptyData Error = 295 ErrNoRemoteShardFound Error = 296 ErrShardHasNoConnections Error = 297 ErrCannotPipe Error = 298 ErrCannotFork Error = 299 ErrCannotDlsym Error = 300 ErrCannotCreateChildProcess Error = 301 ErrChildWasNotExitedNormally Error = 302 ErrCannotSelect Error = 303 ErrCannotWaitpid Error = 304 ErrTableWasNotDropped Error = 305 ErrTooDeepRecursion Error = 306 ErrTooManyBytes Error = 307 ErrUnexpectedNodeInZookeeper Error = 308 ErrFunctionCannotHaveParameters Error = 309 ErrInvalidShardWeight Error = 317 ErrInvalidConfigParameter Error = 318 ErrUnknownStatusOfInsert Error = 319 ErrValueIsOutOfRangeOfDataType Error = 321 ErrBarrierTimeout Error = 335 ErrUnknownDatabaseEngine Error = 336 ErrDdlGuardIsActive Error = 337 ErrUnfinished Error = 341 ErrMetadataMismatch Error = 342 ErrSupportIsDisabled Error = 344 ErrTableDiffersTooMuch Error = 345 ErrCannotConvertCharset Error = 346 ErrCannotLoadConfig Error = 347 ErrCannotInsertNullInOrdinaryColumn Error = 349 ErrIncompatibleSourceTables Error = 350 ErrAmbiguousTableName Error = 351 ErrAmbiguousColumnName Error = 352 ErrIndexOfPositionalArgumentIsOutOfRange Error = 353 ErrZlibInflateFailed Error = 354 ErrZlibDeflateFailed Error = 355 ErrBadLambda Error = 356 ErrReservedIdentifierName Error = 357 ErrIntoOutfileNotAllowed Error = 358 ErrTableSizeExceedsMaxDropSizeLimit Error = 359 ErrCannotCreateCharsetConverter Error = 360 ErrSeekPositionOutOfBound Error = 361 ErrCurrentWriteBufferIsExhausted Error = 362 ErrCannotCreateIoBuffer Error = 363 ErrReceivedErrorTooManyRequests Error = 364 ErrOutputIsNotSorted Error = 365 ErrSizesOfNestedColumnsAreInconsistent Error = 366 ErrTooManyFetches Error = 367 ErrBadCast Error = 368 ErrAllReplicasAreStale Error = 369 ErrDataTypeCannotBeUsedInTables Error = 370 ErrInconsistentClusterDefinition Error = 371 ErrSessionNotFound Error = 372 ErrSessionIsLocked Error = 373 ErrInvalidSessionTimeout Error = 374 ErrCannotDlopen Error = 375 ErrCannotParseUUID Error = 376 ErrIllegalSyntaxForDataType Error = 377 ErrDataTypeCannotHaveArguments Error = 378 ErrUnknownStatusOfDistributedDdlTask Error = 379 ErrCannotKill Error = 380 ErrHTTPLengthRequired Error = 381 ErrCannotLoadCatboostModel Error = 382 ErrCannotApplyCatboostModel Error = 383 ErrPartIsTemporarilyLocked Error = 384 ErrMultipleStreamsRequired Error = 385 ErrNoCommonType Error = 386 ErrExternalLoadableAlreadyExists Error = 387 ErrCannotAssignOptimize Error = 388 ErrInsertWasDeduplicated Error = 389 ErrCannotGetCreateTableQuery Error = 390 ErrExternalLibraryError Error = 391 ErrQueryIsProhibited Error = 392 ErrThereIsNoQuery Error = 393 ErrQueryWasCancelled Error = 394 ErrFunctionThrowIfValueIsNonZero Error = 395 ErrTooManyRowsOrBytes Error = 396 ErrQueryIsNotSupportedInMaterializedView Error = 397 ErrCannotParseDomainValueFromString Error = 441 ErrKeeperException Error = 999 ErrPocoException Error = 1000 ErrStdException Error = 1001 ErrUnknownException Error = 1002 ErrConditionalTreeParentNotFound Error = 2001 ErrIllegalProjectionManipulator Error = 2002 ErrAuthenticationFailed Error = 516 )
Subset of possible errors.
func ErrorString ¶
ErrorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
type Exception ¶
Exception is server-side error.
func (*Exception) DecodeAware ¶
DecodeAware decodes exception.
func (*Exception) EncodeAware ¶
EncodeAware encodes exception.
type Feature ¶
type Feature int
Feature represents server side feature.
const ( FeatureBlockInfo Feature = 51903 FeatureTimezone Feature = 54058 FeatureQuotaKeyInClientInfo Feature = 54060 FeatureDisplayName Feature = 54372 FeatureVersionPatch Feature = 54401 FeatureTempTables Feature = 50264 FeatureServerLogs Feature = 54406 FeatureColumnDefaultsMetadata Feature = 54410 FeatureClientWriteInfo Feature = 54420 FeatureSettingsSerializedAsStrings Feature = 54429 FeatureInterServerSecret Feature = 54441 FeatureOpenTelemetry Feature = 54442 FeatureXForwardedForInClientInfo Feature = 54443 FeatureRefererInClientInfo Feature = 54447 FeatureDistributedDepth Feature = 54448 FeatureQueryStartTime Feature = 54449 FeatureProfileEvents Feature = 54451 FeatureParallelReplicas Feature = 54453 FeatureCustomSerialization Feature = 54454 FeatureQuotaKey Feature = 54458 FeatureAddendum Feature = 54458 FeatureParameters Feature = 54459 FeatureServerQueryTimeInProgress Feature = 54460 )
Possible features.
func FeatureString ¶
FeatureString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Feature) IsAFeature ¶
IsAFeature returns "true" if the value is listed in the enum definition. "false" otherwise
type IPv4 ¶
type IPv4 uint32
IPv4 represents IPv4 address as uint32 number.
Not using netip.Addr because uint32 is 5 times faster, consumes 6 times less memory and better represents IPv4.
Use ToIP helper for convenience.
type IPv6 ¶
type IPv6 [16]byte
IPv6 represents IPv6 address.
Same as FixedString(16) internally in ClickHouse.
type Inferable ¶ added in v0.41.0
type Inferable interface {
Infer(t ColumnType) error
}
Inferable can be inferenced from type.
type Input ¶
type Input []InputColumn
Input of query.
type InputColumn ¶
func (InputColumn) EncodeStart ¶
func (c InputColumn) EncodeStart(buf *Buffer, version int)
type Int128 ¶
Int128 represents Int128 type.
func Int128FromUInt64 ¶
Int128FromUInt64 creates new Int128 from uint64.
type Interface ¶
type Interface byte
Interface is interface of client.
func InterfaceString ¶
InterfaceString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func InterfaceValues ¶
func InterfaceValues() []Interface
InterfaceValues returns all values of the enum
func (Interface) IsAInterface ¶
IsAInterface returns "true" if the value is listed in the enum definition. "false" otherwise
type Interval ¶ added in v0.45.0
type Interval struct { Scale IntervalScale Value int64 }
type IntervalScale ¶ added in v0.45.0
type IntervalScale byte
const ( IntervalSecond IntervalScale = iota IntervalMinute IntervalHour IntervalDay IntervalWeek IntervalMonth IntervalQuarter IntervalYear )
func IntervalScaleString ¶ added in v0.45.0
func IntervalScaleString(s string) (IntervalScale, error)
IntervalScaleString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func IntervalScaleValues ¶ added in v0.45.0
func IntervalScaleValues() []IntervalScale
IntervalScaleValues returns all values of the enum
func (IntervalScale) IsAIntervalScale ¶ added in v0.45.0
func (i IntervalScale) IsAIntervalScale() bool
IsAIntervalScale returns "true" if the value is listed in the enum definition. "false" otherwise
func (IntervalScale) String ¶ added in v0.45.0
func (i IntervalScale) String() string
type KV ¶ added in v0.57.0
type KV[K comparable, V any] struct { Key K Value V }
KV is a key-value pair.
type Log ¶
type Log struct { QueryID string `json:"query_id"` Source string `json:"source"` Text string `json:"text"` Time time.Time `json:"event_time"` Host string `json:"host_name"` ThreadID uint64 `json:"thread_id"` Priority int8 `json:"priority"` }
Log from server.
type Logs ¶
type Logs struct { Time ColDateTime TimeMicro ColUInt32 HostName ColStr QueryID ColStr ThreadID ColUInt64 Priority ColInt8 Source ColStr Text ColStr }
Logs from ServerCodeLog packet.
type Nullable ¶
Nullable is T value that can be null.
func NewNullable ¶
NewNullable returns set value of Nullable[T] to v.
type Precision ¶
type Precision byte
Precision of DateTime64.
Tick size (precision): 10^(-precision) seconds. Valid range: [0:9].
const ( // PrecisionSecond is one second precision. PrecisionSecond Precision = 0 // PrecisionMilli is millisecond precision. PrecisionMilli Precision = 3 // PrecisionMicro is microsecond precision. PrecisionMicro Precision = 6 // PrecisionNano is nanosecond precision. PrecisionNano Precision = 9 // PrecisionMax is maximum precision (nanosecond). PrecisionMax = PrecisionNano )
type Preparable ¶
type Preparable interface {
Prepare() error
}
Preparable should be prepared before encoding or decoding.
type Profile ¶
type Profile struct { Rows uint64 Blocks uint64 Bytes uint64 AppliedLimit bool RowsBeforeLimit uint64 CalculatedRowsBeforeLimit bool }
func (Profile) EncodeAware ¶
type ProfileEvent ¶
type ProfileEvent struct { Type ProfileEventType `json:"type"` Name string `json:"name"` Value int64 `json:"value"` Host string `json:"host_name"` Time time.Time `json:"current_time"` ThreadID uint64 `json:"thread_id"` }
ProfileEvent is detailed profiling event from Server.
type ProfileEventType ¶
type ProfileEventType byte
const ( ProfileIncrement ProfileEventType = 1 ProfileGauge ProfileEventType = 2 )
func ProfileEventTypeString ¶
func ProfileEventTypeString(s string) (ProfileEventType, error)
ProfileEventTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ProfileEventTypeValues ¶
func ProfileEventTypeValues() []ProfileEventType
ProfileEventTypeValues returns all values of the enum
func (ProfileEventType) IsAProfileEventType ¶
func (i ProfileEventType) IsAProfileEventType() bool
IsAProfileEventType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ProfileEventType) MarshalJSON ¶ added in v0.59.0
func (i ProfileEventType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for ProfileEventType
func (ProfileEventType) MarshalText ¶ added in v0.59.0
func (i ProfileEventType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ProfileEventType
func (ProfileEventType) String ¶
func (i ProfileEventType) String() string
func (*ProfileEventType) UnmarshalJSON ¶ added in v0.59.0
func (i *ProfileEventType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ProfileEventType
func (*ProfileEventType) UnmarshalText ¶ added in v0.59.0
func (i *ProfileEventType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ProfileEventType
type ProfileEvents ¶
type ProfileEvents struct { Host ColStr Time ColDateTime ThreadID ColUInt64 Type ColInt8 Name ColStr Value ColAuto // UInt64 or Int64 depending on version }
ProfileEvents is data of ServerProfileEvents packet.
func (*ProfileEvents) All ¶
func (d *ProfileEvents) All() ([]ProfileEvent, error)
func (*ProfileEvents) Result ¶
func (d *ProfileEvents) Result() Results
type Progress ¶
type Progress struct { Rows uint64 Bytes uint64 TotalRows uint64 WroteRows uint64 WroteBytes uint64 ElapsedNs uint64 }
Progress of query execution.
func (Progress) EncodeAware ¶
type Query ¶
type Query struct { ID string Body string Secret string Stage Stage Compression Compression Info ClientInfo Settings []Setting Parameters []Parameter }
func (Query) EncodeAware ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements ClickHouse protocol decoding from buffered reader. Not goroutine-safe.
func (*Reader) DisableCompression ¶
func (r *Reader) DisableCompression()
DisableCompression makes next read use raw source of data.
func (*Reader) EnableCompression ¶
func (r *Reader) EnableCompression()
EnableCompression makes next reads use decompressed source of data.
type Resettable ¶ added in v0.47.2
type Resettable interface {
Reset()
}
type ResultColumn ¶
type ResultColumn struct { Name string // Name of column. Inferred if not provided. Data ColResult // Data of column, required. }
ResultColumn can be uses as part of Results or as single Result.
func AutoResult ¶
func AutoResult(name string) ResultColumn
AutoResult is ResultColumn with type inference.
func (ResultColumn) DecodeResult ¶
func (c ResultColumn) DecodeResult(r *Reader, version int, b Block) error
DecodeResult implements Result as "single result" helper.
type ServerCode ¶
type ServerCode byte
ServerCode is sent by server to client.
const ( ServerCodeHello ServerCode = 0 // Server part of "handshake" ServerCodeData ServerCode = 1 // data block (can be compressed) ServerCodeException ServerCode = 2 // runtime exception ServerCodeProgress ServerCode = 3 // query execution progress (bytes, lines) ServerCodePong ServerCode = 4 // ping response (ClientPing) ServerCodeEndOfStream ServerCode = 5 // all packets were transmitted ServerCodeProfile ServerCode = 6 // profiling info ServerCodeTotals ServerCode = 7 // packet with total values (can be compressed) ServerCodeExtremes ServerCode = 8 // packet with minimums and maximums (can be compressed) ServerCodeTablesStatus ServerCode = 9 // response to TablesStatus ServerCodeLog ServerCode = 10 // query execution system log ServerCodeTableColumns ServerCode = 11 // columns description ServerPartUUIDs ServerCode = 12 // list of unique parts ids. ServerReadTaskRequest ServerCode = 13 // String (UUID) describes a request for which next task is needed ServerProfileEvents ServerCode = 14 // Packet with profile events from server )
Possible server codes.
func ServerCodeString ¶
func ServerCodeString(s string) (ServerCode, error)
ServerCodeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ServerCodeValues ¶
func ServerCodeValues() []ServerCode
ServerCodeValues returns all values of the enum
func (ServerCode) Compressible ¶
func (c ServerCode) Compressible() bool
Compressible reports whether message can be compressed.
func (ServerCode) IsAServerCode ¶
func (i ServerCode) IsAServerCode() bool
IsAServerCode returns "true" if the value is listed in the enum definition. "false" otherwise
func (ServerCode) String ¶
func (i ServerCode) String() string
type ServerHello ¶
type ServerHello struct { Name string Major int Minor int Revision int Timezone string DisplayName string Patch int }
ServerHello is answer to ClientHello and represents ServerCodeHello message.
func (*ServerHello) DecodeAware ¶
func (s *ServerHello) DecodeAware(r *Reader, v int) error
DecodeAware decodes ServerHello message from Reader.
func (*ServerHello) EncodeAware ¶
func (s *ServerHello) EncodeAware(b *Buffer, v int)
func (ServerHello) Features ¶
func (s ServerHello) Features() []Feature
Features implemented by server.
func (ServerHello) Has ¶
func (s ServerHello) Has(f Feature) bool
Has reports whether Feature is implemented.
func (ServerHello) String ¶
func (s ServerHello) String() string
type Stage ¶
type Stage byte
Stage of query till SELECT should be executed.
StageComplete is query complete.
func StageString ¶
StageString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
type StateDecoder ¶
type StateEncoder ¶
type StateEncoder interface {
EncodeState(b *Buffer)
}
type Stateful ¶ added in v0.41.0
type Stateful interface { StateEncoder StateDecoder }
type TableColumns ¶
func (*TableColumns) DecodeAware ¶
func (c *TableColumns) DecodeAware(r *Reader, _ int) error
func (TableColumns) EncodeAware ¶
func (c TableColumns) EncodeAware(b *Buffer, _ int)
type UInt128 ¶
UInt128 represents UInt128 type.
func UInt128FromInt ¶
UInt128FromInt creates new UInt128 from int.
func UInt128FromUInt64 ¶
UInt128FromUInt64 creates new UInt128 from uint64.
type UInt256 ¶
UInt256 is 256-bit unsigned integer.
func UInt256FromInt ¶
UInt256FromInt creates new UInt256 from int.
func UInt256FromUInt64 ¶
UInt256FromUInt64 creates new UInt256 from uint64.
type Writer ¶ added in v0.63.0
type Writer struct {
// contains filtered or unexported fields
}
Writer is a column writer.
It helps to reduce memory footprint by writing column using vector I/O.
func (*Writer) ChainBuffer ¶ added in v0.63.0
ChainBuffer creates a temporary buffer and adds it to the vector to write later.
Data is not written immediately, call Writer.Flush to flush data.
NB: do not retain buffer.
func (*Writer) ChainWrite ¶ added in v0.63.0
ChainWrite adds buffer to the vector to write later.
Passed byte slice may be captured until Writer.Flush is called.
Source Files ¶
- block.go
- bool.go
- buffer.go
- client_code.go
- client_code_enum.go
- client_data.go
- client_hello.go
- client_info.go
- client_info_interface_enum.go
- client_info_query_enum.go
- col_arr.go
- col_arr_go123.go
- col_auto.go
- col_auto_gen.go
- col_bool.go
- col_bool_unsafe.go
- col_date.go
- col_date32.go
- col_date32_gen.go
- col_date32_unsafe_gen.go
- col_date_gen.go
- col_date_unsafe_gen.go
- col_datetime.go
- col_datetime64.go
- col_datetime64_unsafe_gen.go
- col_datetime_unsafe_gen.go
- col_decimal128_gen.go
- col_decimal128_unsafe_gen.go
- col_decimal256_gen.go
- col_decimal256_unsafe_gen.go
- col_decimal32_gen.go
- col_decimal32_unsafe_gen.go
- col_decimal64_gen.go
- col_decimal64_unsafe_gen.go
- col_enum.go
- col_enum16_gen.go
- col_enum16_unsafe_gen.go
- col_enum8_gen.go
- col_enum8_unsafe_gen.go
- col_fixed_str.go
- col_fixedstr128_gen.go
- col_fixedstr128_unsafe_gen.go
- col_fixedstr16_gen.go
- col_fixedstr16_unsafe_gen.go
- col_fixedstr256_gen.go
- col_fixedstr256_unsafe_gen.go
- col_fixedstr32_gen.go
- col_fixedstr32_unsafe_gen.go
- col_fixedstr512_gen.go
- col_fixedstr512_unsafe_gen.go
- col_fixedstr64_gen.go
- col_fixedstr64_unsafe_gen.go
- col_fixedstr8_gen.go
- col_fixedstr8_unsafe_gen.go
- col_float32_gen.go
- col_float32_unsafe_gen.go
- col_float64_gen.go
- col_float64_unsafe_gen.go
- col_int128_gen.go
- col_int128_unsafe_gen.go
- col_int16_gen.go
- col_int16_unsafe_gen.go
- col_int256_gen.go
- col_int256_unsafe_gen.go
- col_int32_gen.go
- col_int32_unsafe_gen.go
- col_int64_gen.go
- col_int64_unsafe_gen.go
- col_int8_gen.go
- col_int8_unsafe_gen.go
- col_interval.go
- col_ipv4_gen.go
- col_ipv4_unsafe_gen.go
- col_ipv6_gen.go
- col_ipv6_unsafe_gen.go
- col_json_str.go
- col_low_cardinality.go
- col_low_cardinality_enum.go
- col_low_cardinality_raw.go
- col_map.go
- col_map_go123.go
- col_nothing.go
- col_nullable.go
- col_point.go
- col_raw.go
- col_raw_of.go
- col_str.go
- col_tuple.go
- col_uint128_gen.go
- col_uint128_unsafe_gen.go
- col_uint16_gen.go
- col_uint16_unsafe_gen.go
- col_uint256_gen.go
- col_uint256_unsafe_gen.go
- col_uint32_gen.go
- col_uint32_unsafe_gen.go
- col_uint64_gen.go
- col_uint64_unsafe_gen.go
- col_uint8_gen.go
- col_uint8_safe_gen.go
- col_uuid.go
- col_uuid_unsafe.go
- column.go
- compression.go
- compression_enum.go
- date.go
- date32.go
- datetime.go
- datetime64.go
- decimal.go
- enum16.go
- enum8.go
- error.go
- error_codes.go
- error_enum.go
- exception.go
- feature.go
- feature_enum.go
- gen.go
- int128.go
- int256.go
- interval_enum.go
- ipv4.go
- ipv6.go
- profile.go
- profile_enum.go
- profile_events.go
- progress.go
- proto.go
- query.go
- reader.go
- reset.go
- results.go
- server_code.go
- server_code_enum.go
- server_hello.go
- server_log.go
- slice_unsafe.go
- stage.go
- stage_enum.go
- table_columns.go
- writer.go