Update golangci-lint and turn it on in CI

This commit is contained in:
Dmitry Kropachev
2024-06-14 13:07:21 -04:00
committed by Sylwia Szunejko
parent a9ab270196
commit ab80d70106
37 changed files with 225 additions and 151 deletions

View File

@@ -18,21 +18,21 @@ import (
// BatchBuilder builds CQL BATCH statements.
type BatchBuilder struct {
unlogged bool
counter bool
using using
stmts []string
names []string
using using
unlogged bool
counter bool
}
// Batch returns a new BatchBuilder.
// BatchBuilder encapsulates batch cqls as one ordinary gocql.Query for convenience.
// Below are the limitations of encapsulating batch cqls based on gocql.Query instead of gocql.Batch:
// * gocql.Batch has some more batch specific check, such as BatchSize(65535).
// * gocql.Batch use BatchObserver instead of QueryObserver.
// * gocql.Batch has cancelBatch call back.
// * gocql.Batch prepares the included statements separately, which is more efficient.
// In contrast, gocqlx.qb.BatchBuilder, which is based on gocql.Query, prepares the whole batch statements as one ordinary query.
// - gocql.Batch has some more batch specific check, such as BatchSize(65535).
// - gocql.Batch use BatchObserver instead of QueryObserver.
// - gocql.Batch has cancelBatch call back.
// - gocql.Batch prepares the included statements separately, which is more efficient.
// In contrast, gocqlx.qb.BatchBuilder, which is based on gocql.Query, prepares the whole batch statements as one ordinary query.
//
// Deprecated: Please use gocql.Session.NewBatch() instead.
func Batch() *BatchBuilder {