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
@@ -69,13 +69,13 @@ func TestSelectBuilder(t *testing.T) {
|
||||
{
|
||||
B: Select("cycling.cyclist_name").Where(EqTuple("id", 2), Gt("firstname")),
|
||||
S: "SELECT * FROM cycling.cyclist_name WHERE id=(?,?) AND firstname>? ",
|
||||
N: []string{"id", "firstname"},
|
||||
N: []string{"id_0", "id_1", "firstname"},
|
||||
},
|
||||
// Add WHERE with only tuples
|
||||
{
|
||||
B: Select("cycling.cyclist_name").Where(EqTuple("id", 2), GtTuple("firstname", 2)),
|
||||
S: "SELECT * FROM cycling.cyclist_name WHERE id=(?,?) AND firstname>(?,?) ",
|
||||
N: []string{"id", "firstname"},
|
||||
N: []string{"id_0", "id_1", "firstname_0", "firstname_1"},
|
||||
},
|
||||
// Add GROUP BY
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user