mirror of
https://github.com/hanzo-ds/go.git
synced 2026-10-30 19:45:01 +00:00
Feature-complete v2.44.0 (lib/churl, lib/col, BFloat16, QBit, scanTypeDuration, Options.Logger *slog.Logger) — fixes the [email protected].0 downgrade RED caught. Package datastore, module github.com/hanzo-ds/go, depends only on hanzo-ds/native. Wire strings preserved VERBATIM (X-ClickHouse-* headers, sql.Register("clickhouse"), clickhouse:// DSN, ClientName="clickhouse-go") — consistent with native.
57 lines
1.1 KiB
Go
57 lines
1.1 KiB
Go
package column
|
|
|
|
import (
|
|
"github.com/hanzo-ds/native/proto"
|
|
"reflect"
|
|
)
|
|
|
|
// SharedVariant deprecated. Use Dynamic/JSON serialization version 3.
|
|
type SharedVariant struct {
|
|
name string
|
|
stringData String
|
|
}
|
|
|
|
func (c *SharedVariant) Name() string {
|
|
return c.name
|
|
}
|
|
|
|
func (c *SharedVariant) Type() Type {
|
|
return "SharedVariant"
|
|
}
|
|
|
|
func (c *SharedVariant) Rows() int {
|
|
return c.stringData.Rows()
|
|
}
|
|
|
|
func (c *SharedVariant) Row(i int, ptr bool) any {
|
|
return c.stringData.Row(i, ptr)
|
|
}
|
|
|
|
func (c *SharedVariant) ScanRow(dest any, row int) error {
|
|
return c.stringData.ScanRow(dest, row)
|
|
}
|
|
|
|
func (c *SharedVariant) Append(v any) (nulls []uint8, err error) {
|
|
return c.stringData.Append(v)
|
|
}
|
|
|
|
func (c *SharedVariant) AppendRow(v any) error {
|
|
return c.stringData.AppendRow(v)
|
|
}
|
|
|
|
func (c *SharedVariant) Encode(buffer *proto.Buffer) {
|
|
c.stringData.Encode(buffer)
|
|
}
|
|
|
|
func (c *SharedVariant) Decode(reader *proto.Reader, rows int) error {
|
|
return c.stringData.Decode(reader, rows)
|
|
}
|
|
|
|
func (c *SharedVariant) ScanType() reflect.Type {
|
|
return c.stringData.ScanType()
|
|
}
|
|
|
|
func (c *SharedVariant) Reset() {
|
|
c.stringData.Reset()
|
|
}
|