diff --git a/query.go b/query.go index 8529cc9..ea531a2 100644 --- a/query.go +++ b/query.go @@ -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 } @@ -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) {