(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestSelectBuilderParamJoin(t *testing.T) { |
| 162 | |
| 163 | expectedSql := "SELECT * FROM bar JOIN baz ON bar.foo = baz.foo AND baz.foo = ?" |
| 164 | expectedArgs := []interface{}{42} |
| 165 | |
| 166 | b := Select("*").From("bar").Join("baz ON bar.foo = baz.foo AND baz.foo = ?", 42) |
| 167 | |
| 168 | sql, args, err := b.ToSql() |
| 169 | assert.NoError(t, err) |
| 170 | |
| 171 | assert.Equal(t, expectedSql, sql) |
| 172 | assert.Equal(t, args, expectedArgs) |
| 173 | } |
| 174 | |
| 175 | func TestSelectBuilderNestedSelectJoin(t *testing.T) { |
| 176 |