mirror of
https://github.com/hanzo-ds/native.git
synced 2026-10-30 20:00:34 +00:00
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.
17 lines
458 B
Go
17 lines
458 B
Go
package proto
|
|
|
|
import "strings"
|
|
|
|
import "testing"
|
|
|
|
// Name is sent in ClientHello and lands in the server's system.query_log, so it
|
|
// is wire visible and must not carry the upstream vendor's name.
|
|
func TestClientHelloName(t *testing.T) {
|
|
if Name != "datastore/native" {
|
|
t.Errorf("Name = %q, want %q", Name, "datastore/native")
|
|
}
|
|
if strings.Contains(strings.ToLower(Name), "clickhouse") {
|
|
t.Errorf("Name %q still carries the vendor brand", Name)
|
|
}
|
|
}
|