Skip to content

Commit

Permalink
[contrib/gocql] adding support for MapScanCAS in gocql (cassandra)
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoot committed Jun 19, 2024
1 parent 618b9bf commit dc4eadb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contrib/gocql/gocql/gocql.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ func (tq *Query) MapScan(m map[string]interface{}) error {
return err
}

// MapScanCAS wraps in a span query.MapScanCAS call.
func (tq *Query) MapScanCAS(m map[string]interface{}) (applied bool, err error) {
span := tq.newChildSpan(tq.ctx)
applied, err = tq.Query.MapScanCAS(m)
tq.finishSpan(span, err)
return applied, err
}

// Scan wraps in a span query.Scan call.
func (tq *Query) Scan(dest ...interface{}) error {
span := tq.newChildSpan(tq.ctx)
Expand Down

0 comments on commit dc4eadb

Please sign in to comment.