|
@@ -243,6 +243,12 @@ func (q *Query) Consistency(c Consistency) *Query {
|
|
|
return q
|
|
return q
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// GetConsistency returns the currently configured consistency level for
|
|
|
|
|
+// the query.
|
|
|
|
|
+func (q *Query) GetConsistency() Consistency {
|
|
|
|
|
+ return q.cons
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// Trace enables tracing of this query. Look at the documentation of the
|
|
// Trace enables tracing of this query. Look at the documentation of the
|
|
|
// Tracer interface to learn more about tracing.
|
|
// Tracer interface to learn more about tracing.
|
|
|
func (q *Query) Trace(trace Tracer) *Query {
|
|
func (q *Query) Trace(trace Tracer) *Query {
|
|
@@ -485,6 +491,12 @@ func (b *Batch) Latency() int64 {
|
|
|
return 0
|
|
return 0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// GetConsistency returns the currently configured consistency level for the batch
|
|
|
|
|
+// operation.
|
|
|
|
|
+func (b *Batch) GetConsistency() Consistency {
|
|
|
|
|
+ return b.Cons
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// Query adds the query to the batch operation
|
|
// Query adds the query to the batch operation
|
|
|
func (b *Batch) Query(stmt string, args ...interface{}) {
|
|
func (b *Batch) Query(stmt string, args ...interface{}) {
|
|
|
b.Entries = append(b.Entries, BatchEntry{Stmt: stmt, Args: args})
|
|
b.Entries = append(b.Entries, BatchEntry{Stmt: stmt, Args: args})
|