Skip to content

Commit

Permalink
Update query.go
Browse files Browse the repository at this point in the history
  • Loading branch information
max-melentyev authored and willfaught committed Feb 2, 2024
1 parent 90c06c7 commit 765f222
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ type Query interface {
// SetConsistency sets the consistency level for this query.
SetConsistency(c gocql.Consistency)

// SetConsistency sets the consistency level for this query.
// Consistency sets the consistency level for this query. If no consistency
// level have been set, the default consistency level of the cluster
// is used.
Consistency(c gocql.Consistency) Query
}

Expand Down Expand Up @@ -176,8 +178,7 @@ func (q query) SetConsistency(c gocql.Consistency) {
}

func (q query) Consistency(c gocql.Consistency) Query {
q.q = q.q.Consistency(c)
return q
return &query{q: q.q.Consistency(c)}
}

func (q query) MapScanCAS(dest map[string]interface{}) (applied bool, err error) {
Expand Down

0 comments on commit 765f222

Please sign in to comment.