qb.BatchBuilder: Remove deprecated flag and add comments on its limitation and warning
This commit is contained in:
committed by
Michal Jan Matczuk
parent
d76ea6c678
commit
1083dcf024
@@ -23,6 +23,13 @@ type BatchBuilder struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Batch returns a new BatchBuilder.
|
// 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.
|
||||||
//
|
//
|
||||||
// Deprecated: Please use gocql.Session.NewBatch() instead.
|
// Deprecated: Please use gocql.Session.NewBatch() instead.
|
||||||
func Batch() *BatchBuilder {
|
func Batch() *BatchBuilder {
|
||||||
|
|||||||
Reference in New Issue
Block a user