Update module github.com/ClickHouse/clickhouse-go/v2 to v2.37.2 (#176)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-06-24 11:43:56 +03:00
committed by GitHub
parent 9c1dc03fbf
commit 9f9c12ece8
8 changed files with 54 additions and 27 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ go 1.24
toolchain go1.24.4
require (
github.com/ClickHouse/clickhouse-go/v2 v2.37.1
github.com/ClickHouse/clickhouse-go/v2 v2.37.2
github.com/PuerkitoBio/goquery v1.10.3
github.com/badoux/checkmail v1.2.4
github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df
@@ -27,7 +27,7 @@ require (
)
require (
github.com/ClickHouse/ch-go v0.66.0 // indirect
github.com/ClickHouse/ch-go v0.66.1 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/andybalholm/cascadia v1.3.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
+4
View File
@@ -2,12 +2,16 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/ClickHouse/ch-go v0.66.0 h1:hLslxxAVb2PHpbHr4n0d6aP8CEIpUYGMVT1Yj/Q5Img=
github.com/ClickHouse/ch-go v0.66.0/go.mod h1:noiHWyLMJAZ5wYuq3R/K0TcRhrNA8h7o1AqHX0klEhM=
github.com/ClickHouse/ch-go v0.66.1 h1:LQHFslfVYZsISOY0dnOYOXGkOUvpv376CCm8g7W74A4=
github.com/ClickHouse/ch-go v0.66.1/go.mod h1:NEYcg3aOFv2EmTJfo4m2WF7sHB/YFbLUuIWv9iq76xY=
github.com/ClickHouse/clickhouse-go v1.5.4 h1:cKjXeYLNWVJIx2J1K6H2CqyRmfwVJVY1OV1coaaFcI0=
github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/ClickHouse/clickhouse-go/v2 v2.34.0 h1:Y4rqkdrRHgExvC4o/NTbLdY5LFQ3LHS77/RNFxFX3Co=
github.com/ClickHouse/clickhouse-go/v2 v2.34.0/go.mod h1:yioSINoRLVZkLyDzdMXPLRIqhDvel8iLBlwh6Iefso8=
github.com/ClickHouse/clickhouse-go/v2 v2.37.1 h1:AvNJQW0QJudpl6JjH8WyMfu2s3ruWxtp0E1WZKmZXLc=
github.com/ClickHouse/clickhouse-go/v2 v2.37.1/go.mod h1:1KKjGFSWu2R/oa7DKWJLlhTOtyCld7VJDEtXTe+2QKU=
github.com/ClickHouse/clickhouse-go/v2 v2.37.2 h1:wRLNKoynvHQEN4znnVHNLaYnrqVc9sGJmGYg+GGCfto=
github.com/ClickHouse/clickhouse-go/v2 v2.37.2/go.mod h1:pH2zrBGp5Y438DMwAxXMm1neSXPPjSI7tD4MURVULw8=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE=
+19 -15
View File
@@ -19,7 +19,11 @@ func (b *Buffer) Reader() *Reader {
// Ensure Buf length.
func (b *Buffer) Ensure(n int) {
b.Buf = append(b.Buf[:0], make([]byte, n)...)
if cap(b.Buf) < n {
b.Buf = make([]byte, n)
} else {
b.Buf = b.Buf[:n] // Set length to n (zeros not guaranteed)
}
}
// Encoder implements encoding to Buffer.
@@ -67,8 +71,8 @@ func (b *Buffer) PutRaw(v []byte) {
// PutUVarInt encodes x as uvarint.
func (b *Buffer) PutUVarInt(x uint64) {
buf := make([]byte, binary.MaxVarintLen64)
n := binary.PutUvarint(buf, x)
buf := [binary.MaxVarintLen64]byte{}
n := binary.PutUvarint(buf[:], x)
b.Buf = append(b.Buf, buf[:n]...)
}
@@ -98,27 +102,27 @@ func (b *Buffer) PutUInt8(x uint8) {
}
func (b *Buffer) PutUInt16(x uint16) {
buf := make([]byte, 16/8)
binary.LittleEndian.PutUint16(buf, x)
b.Buf = append(b.Buf, buf...)
buf := [16 / 8]byte{}
binary.LittleEndian.PutUint16(buf[:], x)
b.Buf = append(b.Buf, buf[:]...)
}
func (b *Buffer) PutUInt32(x uint32) {
buf := make([]byte, 32/8)
binary.LittleEndian.PutUint32(buf, x)
b.Buf = append(b.Buf, buf...)
buf := [32 / 8]byte{}
binary.LittleEndian.PutUint32(buf[:], x)
b.Buf = append(b.Buf, buf[:]...)
}
func (b *Buffer) PutUInt64(x uint64) {
buf := make([]byte, 64/8)
binary.LittleEndian.PutUint64(buf, x)
b.Buf = append(b.Buf, buf...)
buf := [64 / 8]byte{}
binary.LittleEndian.PutUint64(buf[:], x)
b.Buf = append(b.Buf, buf[:]...)
}
func (b *Buffer) PutUInt128(x UInt128) {
buf := make([]byte, 128/8)
binPutUInt128(buf, x)
b.Buf = append(b.Buf, buf...)
buf := [128 / 8]byte{}
binPutUInt128(buf[:], x)
b.Buf = append(b.Buf, buf[:]...)
}
func (b *Buffer) PutInt8(v int8) {
+9 -4
View File
@@ -68,9 +68,14 @@ func (c *ColStr) Reset() {
// EncodeColumn encodes String rows to *Buffer.
func (c ColStr) EncodeColumn(b *Buffer) {
buf := make([]byte, binary.MaxVarintLen64)
var buf [binary.MaxVarintLen64]byte
for _, p := range c.Pos {
n := binary.PutUvarint(buf, uint64(p.End-p.Start))
length := uint64(p.End - p.Start)
// Encode to temp buffer first
n := binary.PutUvarint(buf[:], length)
// Append only the bytes we need
b.Buf = append(b.Buf, buf[:n]...)
b.Buf = append(b.Buf, c.Buf[p.Start:p.End]...)
}
@@ -78,12 +83,12 @@ func (c ColStr) EncodeColumn(b *Buffer) {
// WriteColumn writes String rows to *Writer.
func (c ColStr) WriteColumn(w *Writer) {
buf := make([]byte, binary.MaxVarintLen64)
var buf [binary.MaxVarintLen64]byte
// Writing values from c.Buf directly might improve performance if [ColStr] contains a few rows of very long strings.
// However, most of the time it is quite opposite, so we copy data.
w.ChainBuffer(func(b *Buffer) {
for _, p := range c.Pos {
n := binary.PutUvarint(buf, uint64(p.End-p.Start))
n := binary.PutUvarint(buf[:], uint64(p.End-p.Start))
b.PutRaw(buf[:n])
b.PutRaw(c.Buf[p.Start:p.End])
}
+8 -3
View File
@@ -135,12 +135,17 @@ func (r *Reader) StrBytes() ([]byte, error) {
// Str decodes string.
func (r *Reader) Str() (string, error) {
s, err := r.StrBytes()
defer r.b.Reset()
// call StrRaw instead of StrBytes and converting
// so we can avoid a second allocation and copy of
// the str/[]byte data
str, err := r.StrRaw()
if err != nil {
return "", errors.Wrap(err, "bytes")
return "", errors.Wrap(err, "raw")
}
return string(s), err
return string(str), err
}
// Int decodes uvarint as int.
+9
View File
@@ -1,3 +1,12 @@
# v2.37.2, 2025-06-23 <!-- Release notes generated using configuration in .github/release.yml at main -->
## What's Changed
### Other Changes 🛠
* remove dependency on v1, update ch-go by @SpencerTorres in https://github.com/ClickHouse/clickhouse-go/pull/1580
**Full Changelog**: https://github.com/ClickHouse/clickhouse-go/compare/v2.37.1...v2.37.2
# v2.37.1, 2025-06-17 <!-- Release notes generated using configuration in .github/release.yml at main -->
## What's Changed
+1 -1
View File
@@ -30,7 +30,7 @@ const ClientName = "clickhouse-go"
const (
ClientVersionMajor = 2
ClientVersionMinor = 37
ClientVersionPatch = 1
ClientVersionPatch = 2
ClientTCPProtocolVersion = proto.DBMS_TCP_PROTOCOL_VERSION
)
+2 -2
View File
@@ -1,8 +1,8 @@
# github.com/ClickHouse/ch-go v0.66.0
# github.com/ClickHouse/ch-go v0.66.1
## explicit; go 1.23.0
github.com/ClickHouse/ch-go/compress
github.com/ClickHouse/ch-go/proto
# github.com/ClickHouse/clickhouse-go/v2 v2.37.1
# github.com/ClickHouse/clickhouse-go/v2 v2.37.2
## explicit; go 1.23.0
github.com/ClickHouse/clickhouse-go/v2
github.com/ClickHouse/clickhouse-go/v2/contributors