qb: tuples now returns the correct names
The names are auto generated in the form param_0, param_1, ...
This commit is contained in:
committed by
Michal Matczuk
parent
219bceab51
commit
1fda6f1e29
@@ -47,19 +47,19 @@ func TestDeleteBuilder(t *testing.T) {
|
||||
{
|
||||
B: Delete("cycling.cyclist_name").Where(EqTuple("id", 2)).Columns("stars"),
|
||||
S: "DELETE stars FROM cycling.cyclist_name WHERE id=(?,?) ",
|
||||
N: []string{"id"},
|
||||
N: []string{"id_0", "id_1"},
|
||||
},
|
||||
// Add WHERE for tuple column
|
||||
{
|
||||
B: Delete("cycling.cyclist_name").Where(w, GtTuple("firstname", 2)),
|
||||
S: "DELETE FROM cycling.cyclist_name WHERE id=? AND firstname>(?,?) ",
|
||||
N: []string{"expr", "firstname"},
|
||||
N: []string{"expr", "firstname_0", "firstname_1"},
|
||||
},
|
||||
// Add WHERE for all tuple columns
|
||||
{
|
||||
B: Delete("cycling.cyclist_name").Where(EqTuple("id", 2), GtTuple("firstname", 2)),
|
||||
S: "DELETE FROM cycling.cyclist_name WHERE id=(?,?) AND firstname>(?,?) ",
|
||||
N: []string{"id", "firstname"},
|
||||
N: []string{"id_0", "id_1", "firstname_0", "firstname_1"},
|
||||
},
|
||||
// Add IF
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user