Skip to content

Commit

Permalink
Remove global NewBatch function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tengu-alt authored and joao-r-reis committed Nov 19, 2024
1 parent 7b7e6af commit adda8ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

- Remove global NewBatch function (CASSGO-15)

### Fixed

## [1.7.0] - 2024-09-23
Expand Down
12 changes: 0 additions & 12 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1747,18 +1747,6 @@ type Batch struct {
routingInfo *queryRoutingInfo
}

// NewBatch creates a new batch operation without defaults from the cluster
//
// Deprecated: use session.NewBatch instead
func NewBatch(typ BatchType) *Batch {
return &Batch{
Type: typ,
metrics: &queryMetrics{m: make(map[string]*hostMetrics)},
spec: &NonSpeculativeExecution{},
routingInfo: &queryRoutingInfo{},
}
}

// NewBatch creates a new batch operation using defaults defined in the cluster
func (s *Session) NewBatch(typ BatchType) *Batch {
s.mu.RLock()
Expand Down

0 comments on commit adda8ea

Please sign in to comment.