Add option to add ALLOW FILTERING to the update query (#290)

This commit is contained in:
Sylwia Szunejko
2024-09-10 16:13:54 +02:00
committed by GitHub
parent c6a436b905
commit 6ba176a175
2 changed files with 17 additions and 0 deletions

View File

@@ -161,6 +161,12 @@ func TestUpdateBuilder(t *testing.T) {
S: "UPDATE cycling.cyclist_name SET timestamp=timestamp-now() ",
N: nil,
},
// Add ALLOW FILTERING
{
B: Update("cycling.cyclist_name").Set("id", "user_uuid", "firstname").Where(w).AllowFiltering(),
S: "UPDATE cycling.cyclist_name SET id=?,user_uuid=?,firstname=? WHERE id=? ALLOW FILTERING ",
N: []string{"id", "user_uuid", "firstname", "expr"},
},
}
for _, test := range table {