Files
native/proto/col_enum8_safe_gen.go
zeekay ef352c1051 debrand: rename the wire client name, prose and linter config
proto.Name is sent in ClientHello and lands in the server's system.query_log,
so it is wire visible; it now reads datastore/native and is covered by a test.
Verified against the live server: the handshake succeeds and the new name
appears in query_log.

goimports' local-prefixes still named the upstream module, so it was not
grouping this module's own imports.

Doc comments, the deprecated-error markers in proto/error_codes.go and the
package prose are swept. Dead references are removed rather than repointed:
go-faster.org/docs/clickhouse and the mangled Datastore/clickhouse-cpp link
both 404, and the list of other vendors' clients does not belong here.

Four things deliberately keep the vendor name, and CI records why:
LICENSE and AUTHORS are the copyright notices Apache-2.0 requires; db.system in
query.go is an OpenTelemetry enum whose registered value for this DBMS is fixed
by the specification, so emitting anything else would be non-conformant; and
README names clickhouse-local, which is genuinely the binary our own server
image ships.

Numeric error codes and protocol revision constants are untouched.
2026-07-26 11:50:36 -07:00

49 lines
921 B
Go

//go:build !(amd64 || arm64 || riscv64) || purego
// Code generated by ./cmd/ch-gen-col, DO NOT EDIT.
package proto
import (
"encoding/binary"
"github.com/go-faster/errors"
)
var _ = binary.LittleEndian // the server uses LittleEndian
// DecodeColumn decodes Enum8 rows from *Reader.
func (c *ColEnum8) DecodeColumn(r *Reader, rows int) error {
if rows == 0 {
return nil
}
data, err := r.ReadRaw(rows)
if err != nil {
return errors.Wrap(err, "read")
}
v := *c
v = append(v, make([]Enum8, rows)...)
for i := range data {
v[i] = Enum8(data[i])
}
*c = v
return nil
}
// EncodeColumn encodes Enum8 rows to *Buffer.
func (c ColEnum8) EncodeColumn(b *Buffer) {
v := c
if len(v) == 0 {
return
}
start := len(b.Buf)
b.Buf = append(b.Buf, make([]byte, len(v))...)
for i := range v {
b.Buf[i+start] = uint8(v[i])
}
}
func (c ColEnum8) WriteColumn(w *Writer) {
w.ChainBuffer(c.EncodeColumn)
}