chschema

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: BSD-2-Clause Imports: 23 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(fmter Formatter, b []byte, v any) []byte

func AppendBool

func AppendBool(dst []byte, v bool) []byte

func AppendBytes

func AppendBytes(b []byte, bytes []byte) []byte

func AppendError

func AppendError(b []byte, err error) []byte

func AppendFQN

func AppendFQN(b []byte, field string) []byte

func AppendFloat

func AppendFloat(dst []byte, v float64) []byte

func AppendIdent

func AppendIdent(b []byte, field string) []byte

func AppendNull

func AppendNull(b []byte) []byte

func AppendQuery

func AppendQuery(b []byte, query string, args ...any) []byte

func AppendQueryAppender

func AppendQueryAppender(fmter Formatter, b []byte, app QueryAppender) []byte

func AppendString

func AppendString(b []byte, s string) []byte

func AppendTime

func AppendTime(b []byte, tm time.Time) []byte

func AppendValue

func AppendValue(fmter Formatter, b []byte, v reflect.Value) []byte

func FormatQuery

func FormatQuery(query string, args ...any) string

func SetTableNameInflector

func SetTableNameInflector(fn func(string) string)

SetTableNameInflector overrides the default func that pluralizes model name to get table name, e.g. my_article becomes my_articles.

Types

type AfterScanRowHook

type AfterScanRowHook interface {
	AfterScanRow(context.Context) error
}

type AppenderFunc

type AppenderFunc func(fmter Formatter, b []byte, v reflect.Value) []byte

func Appender

func Appender(typ reflect.Type) AppenderFunc

type ArrayColumn

type ArrayColumn struct {
	Column reflect.Value
	// contains filtered or unexported fields
}

func (*ArrayColumn) AppendValue

func (c *ArrayColumn) AppendValue(v reflect.Value)

func (*ArrayColumn) ConvertAssign

func (c *ArrayColumn) ConvertAssign(idx int, v reflect.Value) error

func (*ArrayColumn) Index

func (c *ArrayColumn) Index(idx int) any

func (*ArrayColumn) Len

func (c *ArrayColumn) Len() int

func (*ArrayColumn) Nullable

func (c *ArrayColumn) Nullable(nulls Uint8Column) any

func (*ArrayColumn) ReadFrom

func (c *ArrayColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*ArrayColumn) Reset

func (c *ArrayColumn) Reset(numRow int)

func (*ArrayColumn) Set

func (c *ArrayColumn) Set(v any)

func (ArrayColumn) Slice

func (c ArrayColumn) Slice(s, e int) any

func (ArrayColumn) Type

func (c ArrayColumn) Type() reflect.Type

func (*ArrayColumn) Value

func (c *ArrayColumn) Value() any

func (*ArrayColumn) WriteOffset

func (c *ArrayColumn) WriteOffset(wr *chproto.Writer, offset int) int

func (*ArrayColumn) WriteTo

func (c *ArrayColumn) WriteTo(wr *chproto.Writer) error

type ArrayColumnar

type ArrayColumnar interface {
	WriteOffset(wr *chproto.Writer, offset int) int
	WriteData(wr *chproto.Writer) error
}

type ArrayLCStringColumn

type ArrayLCStringColumn struct {
	*LCStringColumn
}

func (*ArrayLCStringColumn) ReadFrom

func (c *ArrayLCStringColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (ArrayLCStringColumn) Type

func (c ArrayLCStringColumn) Type() reflect.Type

func (*ArrayLCStringColumn) WriteTo

func (c *ArrayLCStringColumn) WriteTo(wr *chproto.Writer) error

type Block

type Block struct {
	Table *Table

	NumColumn int // read-only
	NumRow    int // read-only

	Columns []*Column
	// contains filtered or unexported fields
}

func NewBlock

func NewBlock(table *Table, numCol, numRow int) *Block

func (*Block) Column

func (b *Block) Column(colName, colType string) *Column

func (*Block) ColumnForField

func (b *Block) ColumnForField(field *Field) *Column

func (*Block) WriteTo

func (b *Block) WriteTo(wr *chproto.Writer) error

type BoolColumn

type BoolColumn struct {
	ColumnOf[bool]
}

func (*BoolColumn) AppendValue

func (c *BoolColumn) AppendValue(v reflect.Value)

func (BoolColumn) ConvertAssign

func (c BoolColumn) ConvertAssign(idx int, v reflect.Value) error

func (*BoolColumn) ReadFrom

func (c *BoolColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (BoolColumn) Type

func (c BoolColumn) Type() reflect.Type

func (BoolColumn) WriteTo

func (c BoolColumn) WriteTo(wr *chproto.Writer) error

type BytesColumn

type BytesColumn struct {
	ColumnOf[[]byte]
}

func (*BytesColumn) AppendValue

func (c *BytesColumn) AppendValue(v reflect.Value)

func (BytesColumn) ConvertAssign

func (c BytesColumn) ConvertAssign(idx int, v reflect.Value) error

func (*BytesColumn) ReadFrom

func (c *BytesColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*BytesColumn) Reset

func (c *BytesColumn) Reset(numRow int)

func (BytesColumn) Type

func (c BytesColumn) Type() reflect.Type

func (BytesColumn) WriteTo

func (c BytesColumn) WriteTo(wr *chproto.Writer) error

type CHModel

type CHModel struct{}

type Column

type Column struct {
	Name  string
	Type  string
	Field *Field

	Columnar
}

func (*Column) String

func (c *Column) String() string

type ColumnOf

type ColumnOf[T any] struct {
	Column []T
}

func NewColumnOf

func NewColumnOf[T any](numRow int) ColumnOf[T]

func (*ColumnOf[T]) Alloc

func (c *ColumnOf[T]) Alloc(numRow int)

func (*ColumnOf[T]) AppendValue

func (c *ColumnOf[T]) AppendValue(v reflect.Value)

func (*ColumnOf[T]) ConvertAssign

func (c *ColumnOf[T]) ConvertAssign(idx int, dest reflect.Value) error

func (ColumnOf[T]) Index

func (c ColumnOf[T]) Index(idx int) any

func (ColumnOf[T]) Len

func (c ColumnOf[T]) Len() int

func (ColumnOf[T]) Nullable

func (c ColumnOf[T]) Nullable(nulls Uint8Column) any

func (*ColumnOf[T]) Reset

func (c *ColumnOf[T]) Reset(numRow int)

func (*ColumnOf[T]) Set

func (c *ColumnOf[T]) Set(v any)

func (ColumnOf[T]) Slice

func (c ColumnOf[T]) Slice(s, e int) any

func (ColumnOf[T]) Value

func (c ColumnOf[T]) Value() any

type Columnar

type Columnar interface {
	ReadFrom(rd *chproto.Reader, numRow int) error
	WriteTo(wr *chproto.Writer) error

	Type() reflect.Type
	Set(v any)
	AppendValue(v reflect.Value)
	Value() any
	Nullable(nulls Uint8Column) any
	Len() int
	Index(idx int) any
	Slice(s, e int) any
	ConvertAssign(idx int, dest reflect.Value) error
}

func NewArrayColumn

func NewArrayColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewBoolColumn

func NewBoolColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewBytesColumn

func NewBytesColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewColumn

func NewColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewColumnFromCHType

func NewColumnFromCHType(chType string, numRow int) Columnar

func NewDateColumn

func NewDateColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewDateTimeColumn

func NewDateTimeColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewEnumColumn

func NewEnumColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewFloat32Column

func NewFloat32Column(typ reflect.Type, chType string, numRow int) Columnar

func NewFloat64Column

func NewFloat64Column(typ reflect.Type, chType string, numRow int) Columnar

func NewIPColumn

func NewIPColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewInt16Column

func NewInt16Column(typ reflect.Type, chType string, numRow int) Columnar

func NewInt32Column

func NewInt32Column(typ reflect.Type, chType string, numRow int) Columnar

func NewInt64Column

func NewInt64Column(typ reflect.Type, chType string, numRow int) Columnar

func NewInt64TimeColumn

func NewInt64TimeColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewInt8Column

func NewInt8Column(typ reflect.Type, chType string, numRow int) Columnar

func NewJSONColumn

func NewJSONColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewLCStringColumn

func NewLCStringColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewStringArrayColumn

func NewStringArrayColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewStringColumn

func NewStringColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewTimeColumn

func NewTimeColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewUUIDColumn

func NewUUIDColumn(typ reflect.Type, chType string, numRow int) Columnar

func NewUint16Column

func NewUint16Column(typ reflect.Type, chType string, numRow int) Columnar

func NewUint32Column

func NewUint32Column(typ reflect.Type, chType string, numRow int) Columnar

func NewUint64Column

func NewUint64Column(typ reflect.Type, chType string, numRow int) Columnar

func NewUint8Column

func NewUint8Column(typ reflect.Type, chType string, numRow int) Columnar

type ColumnsAppender

type ColumnsAppender interface {
	AppendColumns(fmter Formatter, b []byte) ([]byte, error)
}

type DateColumn

type DateColumn struct {
	DateTimeColumn
}

func (*DateColumn) ReadFrom

func (c *DateColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (DateColumn) WriteTo

func (c DateColumn) WriteTo(wr *chproto.Writer) error

type DateTimeColumn

type DateTimeColumn struct {
	ColumnOf[time.Time]
}

func (*DateTimeColumn) AppendValue

func (c *DateTimeColumn) AppendValue(v reflect.Value)

func (DateTimeColumn) ConvertAssign

func (c DateTimeColumn) ConvertAssign(idx int, v reflect.Value) error

func (*DateTimeColumn) ReadFrom

func (c *DateTimeColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (DateTimeColumn) Type

func (c DateTimeColumn) Type() reflect.Type

func (DateTimeColumn) WriteTo

func (c DateTimeColumn) WriteTo(wr *chproto.Writer) error

type EnumColumn

type EnumColumn struct {
	StringColumn
	// contains filtered or unexported fields
}

func (*EnumColumn) ReadFrom

func (c *EnumColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*EnumColumn) WriteTo

func (c *EnumColumn) WriteTo(wr *chproto.Writer) error

type FQN

type FQN string

FQN represents a fully qualified SQL name, for example, table or column name.

func (FQN) AppendQuery

func (s FQN) AppendQuery(fmter Formatter, b []byte) ([]byte, error)

type Field

type Field struct {
	Field reflect.StructField
	Type  reflect.Type
	Index []int

	GoName    string // struct field name, e.g. Id
	CHName    string // SQL name, .e.g. id
	Column    Safe   // escaped SQL name, e.g. "id"
	CHType    string
	CHDefault Safe

	NewColumn NewColumnFunc

	IsPK    bool
	NotNull bool
	// contains filtered or unexported fields
}

func (*Field) AppendValue

func (f *Field) AppendValue(fmter Formatter, b []byte, strct reflect.Value) []byte

func (*Field) String

func (f *Field) String() string

func (*Field) Value

func (f *Field) Value(strct reflect.Value) reflect.Value

type Float32Column

type Float32Column struct {
	NumericColumnOf[float32]
}

func (*Float32Column) AppendValue

func (c *Float32Column) AppendValue(v reflect.Value)

func (*Float32Column) ReadFrom

func (c *Float32Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Float32Column) Type

func (c Float32Column) Type() reflect.Type

func (Float32Column) WriteTo

func (c Float32Column) WriteTo(wr *chproto.Writer) error

type Float64Column

type Float64Column struct {
	NumericColumnOf[float64]
}

func (*Float64Column) AppendValue

func (c *Float64Column) AppendValue(v reflect.Value)

func (*Float64Column) ReadFrom

func (c *Float64Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Float64Column) Type

func (c Float64Column) Type() reflect.Type

func (Float64Column) WriteTo

func (c Float64Column) WriteTo(wr *chproto.Writer) error

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

func NewFormatter

func NewFormatter() Formatter

func (Formatter) AppendIdent

func (f Formatter) AppendIdent(b []byte, ident string) []byte

func (Formatter) AppendQuery

func (f Formatter) AppendQuery(b []byte, query string, args ...any) []byte

func (Formatter) FormatQuery

func (f Formatter) FormatQuery(query string, args ...any) string

func (Formatter) WithArg

func (f Formatter) WithArg(arg NamedArgAppender) Formatter

func (Formatter) WithNamedArg

func (f Formatter) WithNamedArg(name string, value any) Formatter

type IPColumn

type IPColumn struct {
	ColumnOf[net.IP]
}

func (*IPColumn) AppendValue

func (c *IPColumn) AppendValue(v reflect.Value)

func (IPColumn) ConvertAssign

func (c IPColumn) ConvertAssign(idx int, v reflect.Value) error

func (*IPColumn) ReadFrom

func (c *IPColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (IPColumn) Type

func (c IPColumn) Type() reflect.Type

func (IPColumn) WriteTo

func (c IPColumn) WriteTo(wr *chproto.Writer) error

type Ident

type Ident string

Ident represents a SQL identifier, for example, table or column name.

func (Ident) AppendQuery

func (s Ident) AppendQuery(fmter Formatter, b []byte) ([]byte, error)

type Int16Column

type Int16Column struct {
	NumericColumnOf[int16]
}

func (*Int16Column) AppendValue

func (c *Int16Column) AppendValue(v reflect.Value)

func (*Int16Column) ReadFrom

func (c *Int16Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Int16Column) Type

func (c Int16Column) Type() reflect.Type

func (Int16Column) WriteTo

func (c Int16Column) WriteTo(wr *chproto.Writer) error

type Int32Column

type Int32Column struct {
	NumericColumnOf[int32]
}

func (*Int32Column) AppendValue

func (c *Int32Column) AppendValue(v reflect.Value)

func (*Int32Column) ReadFrom

func (c *Int32Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Int32Column) Type

func (c Int32Column) Type() reflect.Type

func (Int32Column) WriteTo

func (c Int32Column) WriteTo(wr *chproto.Writer) error

type Int64Column

type Int64Column struct {
	NumericColumnOf[int64]
}

func (*Int64Column) AppendValue

func (c *Int64Column) AppendValue(v reflect.Value)

func (*Int64Column) ReadFrom

func (c *Int64Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Int64Column) Type

func (c Int64Column) Type() reflect.Type

func (Int64Column) WriteTo

func (c Int64Column) WriteTo(wr *chproto.Writer) error

type Int64TimeColumn

type Int64TimeColumn struct {
	Int64Column
}

func (*Int64TimeColumn) ReadFrom

func (c *Int64TimeColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (Int64TimeColumn) WriteTo

func (c Int64TimeColumn) WriteTo(wr *chproto.Writer) error

type Int8Column

type Int8Column struct {
	NumericColumnOf[int8]
}

func (*Int8Column) AppendValue

func (c *Int8Column) AppendValue(v reflect.Value)

func (*Int8Column) ReadFrom

func (c *Int8Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Int8Column) Type

func (c Int8Column) Type() reflect.Type

func (Int8Column) WriteTo

func (c Int8Column) WriteTo(wr *chproto.Writer) error

type JSONColumn

type JSONColumn struct {
	BytesColumn
	Values []reflect.Value
}

func (*JSONColumn) AppendValue

func (c *JSONColumn) AppendValue(v reflect.Value)

func (*JSONColumn) ConvertAssign

func (c *JSONColumn) ConvertAssign(idx int, v reflect.Value) error

func (*JSONColumn) Len

func (c *JSONColumn) Len() int

func (*JSONColumn) Reset

func (c *JSONColumn) Reset(numRow int)

func (*JSONColumn) WriteTo

func (c *JSONColumn) WriteTo(wr *chproto.Writer) error

type LCStringColumn

type LCStringColumn struct {
	StringColumn
}

func (*LCStringColumn) ReadFrom

func (c *LCStringColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*LCStringColumn) WriteTo

func (c *LCStringColumn) WriteTo(wr *chproto.Writer) error

type Model

type Model interface {
	ScanBlock(*Block) error
}

type NamedArgAppender

type NamedArgAppender interface {
	AppendNamedArg(fmter Formatter, b []byte, name string) ([]byte, bool)
}

type NewColumnFunc

type NewColumnFunc func(typ reflect.Type, chType string, numRow int) Columnar

func ColumnFactory

func ColumnFactory(typ reflect.Type, chType string) NewColumnFunc

keep in sync with clickhouseType

func NullableNewColumnFunc

func NullableNewColumnFunc(fn NewColumnFunc) NewColumnFunc

type NullableColumn

type NullableColumn struct {
	Nulls  Uint8Column
	Values Columnar
	// contains filtered or unexported fields
}

func (*NullableColumn) AppendValue

func (c *NullableColumn) AppendValue(v reflect.Value)

func (*NullableColumn) ConvertAssign

func (c *NullableColumn) ConvertAssign(idx int, dest reflect.Value) error

func (*NullableColumn) Index

func (c *NullableColumn) Index(idx int) any

func (*NullableColumn) Len

func (c *NullableColumn) Len() int

func (*NullableColumn) Nullable

func (c *NullableColumn) Nullable(nulls Uint8Column) any

func (*NullableColumn) ReadFrom

func (c *NullableColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*NullableColumn) Set

func (c *NullableColumn) Set(v any)

func (*NullableColumn) Slice

func (c *NullableColumn) Slice(s, e int) any

func (*NullableColumn) Type

func (c *NullableColumn) Type() reflect.Type

func (*NullableColumn) Value

func (c *NullableColumn) Value() any

func (*NullableColumn) WriteTo

func (c *NullableColumn) WriteTo(wr *chproto.Writer) error

type NumericColumnOf

type NumericColumnOf[T constraints.Integer | constraints.Float] struct {
	ColumnOf[T]
}

func NewNumericColumnOf

func NewNumericColumnOf[T constraints.Integer | constraints.Float](numRow int) NumericColumnOf[T]

func (NumericColumnOf[T]) ConvertAssign

func (c NumericColumnOf[T]) ConvertAssign(idx int, v reflect.Value) error

type Query

type Query interface {
	QueryAppender
	Operation() string
	GetModel() Model
	GetTableName() string
}

type QueryAppender

type QueryAppender interface {
	AppendQuery(fmter Formatter, b []byte) ([]byte, error)
}

type QueryWithArgs

type QueryWithArgs struct {
	Query string
	Args  []any
}

func SafeQuery

func SafeQuery(query string, args []any) QueryWithArgs

func UnsafeIdent

func UnsafeIdent(ident string) QueryWithArgs

func (QueryWithArgs) AppendQuery

func (q QueryWithArgs) AppendQuery(fmter Formatter, b []byte) ([]byte, error)

func (QueryWithArgs) IsZero

func (q QueryWithArgs) IsZero() bool

func (QueryWithArgs) Value

func (q QueryWithArgs) Value() Safe

type QueryWithSep

type QueryWithSep struct {
	QueryWithArgs
	Sep string
}

func SafeQueryWithSep

func SafeQueryWithSep(query string, args []any, sep string) QueryWithSep

type Safe

type Safe string

Safe represents a safe SQL query.

func (Safe) AppendQuery

func (s Safe) AppendQuery(fmter Formatter, b []byte) ([]byte, error)

type StringArrayColumn

type StringArrayColumn struct {
	Column [][]string
	// contains filtered or unexported fields
}

func (*StringArrayColumn) AppendValue

func (c *StringArrayColumn) AppendValue(v reflect.Value)

func (*StringArrayColumn) ConvertAssign

func (c *StringArrayColumn) ConvertAssign(idx int, v reflect.Value) error

func (*StringArrayColumn) Index

func (c *StringArrayColumn) Index(idx int) any

func (*StringArrayColumn) Len

func (c *StringArrayColumn) Len() int

func (*StringArrayColumn) Nullable

func (c *StringArrayColumn) Nullable(nulls Uint8Column) any

func (*StringArrayColumn) ReadFrom

func (c *StringArrayColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (*StringArrayColumn) Reset

func (c *StringArrayColumn) Reset(numRow int)

func (*StringArrayColumn) Set

func (c *StringArrayColumn) Set(v any)

func (StringArrayColumn) Slice

func (c StringArrayColumn) Slice(s, e int) any

func (*StringArrayColumn) Type

func (c *StringArrayColumn) Type() reflect.Type

func (*StringArrayColumn) Value

func (c *StringArrayColumn) Value() any

func (*StringArrayColumn) WriteData

func (c *StringArrayColumn) WriteData(wr *chproto.Writer) error

func (*StringArrayColumn) WriteOffset

func (c *StringArrayColumn) WriteOffset(wr *chproto.Writer, offset int) int

func (*StringArrayColumn) WriteTo

func (c *StringArrayColumn) WriteTo(wr *chproto.Writer) error

type StringColumn

type StringColumn struct {
	ColumnOf[string]
}

func (*StringColumn) AppendValue

func (c *StringColumn) AppendValue(v reflect.Value)

func (StringColumn) ConvertAssign

func (c StringColumn) ConvertAssign(idx int, v reflect.Value) error

func (*StringColumn) ReadFrom

func (c *StringColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (StringColumn) Type

func (c StringColumn) Type() reflect.Type

func (StringColumn) WriteTo

func (c StringColumn) WriteTo(wr *chproto.Writer) error

type Table

type Table struct {
	Type reflect.Type

	ModelName string

	Name         string
	CHName       Safe
	CHInsertName Safe
	CHAlias      Safe
	CHEngine     string
	CHPartition  string

	Fields     []*Field // PKs + DataFields
	PKs        []*Field
	DataFields []*Field
	FieldMap   map[string]*Field
	// contains filtered or unexported fields
}

func TableForType

func TableForType(typ reflect.Type) *Table

func (*Table) AppendNamedArg

func (t *Table) AppendNamedArg(
	fmter Formatter, b []byte, name string, strct reflect.Value,
) ([]byte, bool)

func (*Table) Field

func (t *Table) Field(name string) (*Field, error)

func (*Table) HasAfterScanRowHook

func (t *Table) HasAfterScanRowHook() bool

func (*Table) IsColumnar

func (t *Table) IsColumnar() bool

func (*Table) NewColumn

func (t *Table) NewColumn(colName, colType string, numRow int) *Column

func (*Table) String

func (t *Table) String() string

type TimeColumn

type TimeColumn struct {
	DateTimeColumn
}

func (*TimeColumn) ReadFrom

func (c *TimeColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (TimeColumn) WriteTo

func (c TimeColumn) WriteTo(wr *chproto.Writer) error

type UUID

type UUID [16]byte

type UUIDColumn

type UUIDColumn struct {
	ColumnOf[UUID]
}

TODO: rework to use []byte

func (*UUIDColumn) AppendValue

func (c *UUIDColumn) AppendValue(v reflect.Value)

func (UUIDColumn) ConvertAssign

func (c UUIDColumn) ConvertAssign(idx int, v reflect.Value) error

func (*UUIDColumn) ReadFrom

func (c *UUIDColumn) ReadFrom(rd *chproto.Reader, numRow int) error

func (UUIDColumn) Type

func (c UUIDColumn) Type() reflect.Type

func (UUIDColumn) WriteTo

func (c UUIDColumn) WriteTo(wr *chproto.Writer) error

type Uint16Column

type Uint16Column struct {
	NumericColumnOf[uint16]
}

func (*Uint16Column) AppendValue

func (c *Uint16Column) AppendValue(v reflect.Value)

func (*Uint16Column) ReadFrom

func (c *Uint16Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Uint16Column) Type

func (c Uint16Column) Type() reflect.Type

func (Uint16Column) WriteTo

func (c Uint16Column) WriteTo(wr *chproto.Writer) error

type Uint32Column

type Uint32Column struct {
	NumericColumnOf[uint32]
}

func (*Uint32Column) AppendValue

func (c *Uint32Column) AppendValue(v reflect.Value)

func (*Uint32Column) ReadFrom

func (c *Uint32Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Uint32Column) Type

func (c Uint32Column) Type() reflect.Type

func (Uint32Column) WriteTo

func (c Uint32Column) WriteTo(wr *chproto.Writer) error

type Uint64Column

type Uint64Column struct {
	NumericColumnOf[uint64]
}

func (*Uint64Column) AppendValue

func (c *Uint64Column) AppendValue(v reflect.Value)

func (*Uint64Column) ReadFrom

func (c *Uint64Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Uint64Column) Type

func (c Uint64Column) Type() reflect.Type

func (Uint64Column) WriteTo

func (c Uint64Column) WriteTo(wr *chproto.Writer) error

type Uint8Column

type Uint8Column struct {
	NumericColumnOf[uint8]
}

func (*Uint8Column) AppendValue

func (c *Uint8Column) AppendValue(v reflect.Value)

func (*Uint8Column) ReadFrom

func (c *Uint8Column) ReadFrom(rd *chproto.Reader, numRow int) error

func (Uint8Column) Type

func (c Uint8Column) Type() reflect.Type

func (Uint8Column) WriteTo

func (c Uint8Column) WriteTo(wr *chproto.Writer) error

type UnknownColumnError

type UnknownColumnError struct {
	Table  *Table
	Column string
}

func (*UnknownColumnError) Error

func (err *UnknownColumnError) Error() string

Jump to

Keyboard shortcuts

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