Skip to content

Commit adda8ea

Browse files
tengu-altjoao-r-reis
authored andcommitted
Remove global NewBatch function
Batch should behave like Query, and need to be created from a session. patch by Oleksandr Luzhniy; reviewed by João Reis, Danylo Savchenko, Jackson Fleming, for CASSGO-15
1 parent 7b7e6af commit adda8ea

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
- Don't restrict server authenticator unless PasswordAuthentictor.AllowedAuthenticators is provided (CASSGO-19)
1414

15+
- Remove global NewBatch function (CASSGO-15)
16+
1517
### Fixed
1618

1719
## [1.7.0] - 2024-09-23

session.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,18 +1747,6 @@ type Batch struct {
17471747
routingInfo *queryRoutingInfo
17481748
}
17491749

1750-
// NewBatch creates a new batch operation without defaults from the cluster
1751-
//
1752-
// Deprecated: use session.NewBatch instead
1753-
func NewBatch(typ BatchType) *Batch {
1754-
return &Batch{
1755-
Type: typ,
1756-
metrics: &queryMetrics{m: make(map[string]*hostMetrics)},
1757-
spec: &NonSpeculativeExecution{},
1758-
routingInfo: &queryRoutingInfo{},
1759-
}
1760-
}
1761-
17621750
// NewBatch creates a new batch operation using defaults defined in the cluster
17631751
func (s *Session) NewBatch(typ BatchType) *Batch {
17641752
s.mu.RLock()

0 commit comments

Comments
 (0)