(t *testing.T)
| 210 | } |
| 211 | |
| 212 | func TestSelectBuilderNestedSelectDollar(t *testing.T) { |
| 213 | nestedBuilder := StatementBuilder.PlaceholderFormat(Dollar).Select("*").Prefix("NOT EXISTS ("). |
| 214 | From("bar").Where("y = ?", 42).Suffix(")") |
| 215 | outerSql, _, err := StatementBuilder.PlaceholderFormat(Dollar).Select("*"). |
| 216 | From("foo").Where("x = ?").Where(nestedBuilder).ToSql() |
| 217 | |
| 218 | assert.NoError(t, err) |
| 219 | assert.Equal(t, "SELECT * FROM foo WHERE x = $1 AND NOT EXISTS ( SELECT * FROM bar WHERE y = $2 )", outerSql) |
| 220 | } |
| 221 | |
| 222 | func TestSelectBuilderMustSql(t *testing.T) { |
| 223 | defer func() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…