qb: add support for USING TIMEOUT clause
In scylladb/scylla#7781 we added possibility to add timeout as part of USING spec. This patch adds support for it by adding `Timeout` and `TimeoutNamed` functions to builders. Fixes #194
This commit is contained in:
committed by
Michal Jan Matczuk
parent
96a8de1e1e
commit
979397bc5e
@@ -72,6 +72,16 @@ func TestBatchBuilder(t *testing.T) {
|
||||
S: "BEGIN BATCH USING TIMESTAMP ? APPLY BATCH ",
|
||||
N: []string{"ts"},
|
||||
},
|
||||
// Add TIMEOUT
|
||||
{
|
||||
B: Batch().Timeout(time.Second),
|
||||
S: "BEGIN BATCH USING TIMEOUT 1s APPLY BATCH ",
|
||||
},
|
||||
{
|
||||
B: Batch().TimeoutNamed("to"),
|
||||
S: "BEGIN BATCH USING TIMEOUT ? APPLY BATCH ",
|
||||
N: []string{"to"},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range table {
|
||||
|
||||
Reference in New Issue
Block a user