table: Added cql.builders for insert, update, delete to enable table batch timestamp at statement granularity.
This commit is contained in:
committed by
Michal Jan Matczuk
parent
ab2a96d9f3
commit
fc0b7be8ab
@@ -171,6 +171,17 @@ func TestTableUpdate(t *testing.T) {
|
||||
t.Error(diff, names)
|
||||
}
|
||||
}
|
||||
|
||||
// run UpdateBuilder on the same data set
|
||||
for _, test := range table {
|
||||
stmt, names := New(test.M).UpdateBuilder(test.C...).ToCql()
|
||||
if diff := cmp.Diff(test.S, stmt); diff != "" {
|
||||
t.Error(diff)
|
||||
}
|
||||
if diff := cmp.Diff(test.N, names); diff != "" {
|
||||
t.Error(diff, names)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestTableDelete(t *testing.T) {
|
||||
@@ -220,6 +231,17 @@ func TestTableDelete(t *testing.T) {
|
||||
t.Error(diff, names)
|
||||
}
|
||||
}
|
||||
|
||||
// run DeleteBuilder on the same data set
|
||||
for _, test := range table {
|
||||
stmt, names := New(test.M).DeleteBuilder(test.C...).ToCql()
|
||||
if diff := cmp.Diff(test.S, stmt); diff != "" {
|
||||
t.Error(diff)
|
||||
}
|
||||
if diff := cmp.Diff(test.N, names); diff != "" {
|
||||
t.Error(diff, names)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestTableConcurrentUsage(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user