Add support for BYPASS CACHE

This commit adds support for BYPASS CACHE extension that is present in
ScyllaDB since 3.1 / 2019.1.1.

https://docs.scylladb.com/getting-started/dml/#bypass-cache
This commit is contained in:
Martin Sucha
2019-09-16 16:33:41 +02:00
committed by Michal Matczuk
parent dd98b0e363
commit 75adfd59ee
2 changed files with 26 additions and 0 deletions

View File

@@ -128,6 +128,18 @@ func TestSelectBuilder(t *testing.T) {
S: "SELECT * FROM cycling.cyclist_name WHERE id=? ALLOW FILTERING ",
N: []string{"expr"},
},
// Add ALLOW FILTERING and BYPASS CACHE
{
B: Select("cycling.cyclist_name").Where(w).AllowFiltering().BypassCache(),
S: "SELECT * FROM cycling.cyclist_name WHERE id=? ALLOW FILTERING BYPASS CACHE ",
N: []string{"expr"},
},
// Add BYPASS CACHE
{
B: Select("cycling.cyclist_name").Where(w).BypassCache(),
S: "SELECT * FROM cycling.cyclist_name WHERE id=? BYPASS CACHE ",
N: []string{"expr"},
},
// Add COUNT all
{
B: Select("cycling.cyclist_name").CountAll().Where(Gt("stars")),