File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
common/persistence/nosql/nosqlplugin/cassandra/gocql Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package gocql
2
2
3
3
import (
4
4
"context"
5
+
6
+ "github.com/gocql/gocql"
5
7
)
6
8
7
9
// Note: this file defines the minimal interface that is needed by Temporal's cassandra
34
36
WithTimestamp (int64 ) Query
35
37
Consistency (Consistency ) Query
36
38
Bind (... interface {}) Query
39
+ Idempotent (bool ) Query
40
+ SetSpeculativeExecutionPolicy (SpeculativeExecutionPolicy ) Query
37
41
}
38
42
39
43
// Iter is the interface for executing and iterating over all resulting rows.
52
56
53
57
// SerialConsistency is the serial consistency level used by a Query
54
58
SerialConsistency uint16
59
+
60
+ // SpeculativeExecutionPolicy is a gocql SpeculativeExecutionPolicy
61
+ SpeculativeExecutionPolicy gocql.SpeculativeExecutionPolicy
55
62
)
Original file line number Diff line number Diff line change @@ -100,3 +100,11 @@ func (q *query) Bind(v ...interface{}) Query {
100
100
q .gocqlQuery .Bind (v ... )
101
101
return newQuery (q .session , q .gocqlQuery )
102
102
}
103
+
104
+ func (q * query ) Idempotent (value bool ) Query {
105
+ return newQuery (q .session , q .gocqlQuery .Idempotent (value ))
106
+ }
107
+
108
+ func (q * query ) SetSpeculativeExecutionPolicy (policy SpeculativeExecutionPolicy ) Query {
109
+ return newQuery (q .session , q .gocqlQuery .SetSpeculativeExecutionPolicy (policy ))
110
+ }
You can’t perform that action at this time.
0 commit comments