(t *testing.T)
| 97 | } |
| 98 | |
| 99 | func TestSelectBuilderPlaceholders(t *testing.T) { |
| 100 | b := Select("test").Where("x = ? AND y = ?") |
| 101 | |
| 102 | sql, _, _ := b.PlaceholderFormat(Question).ToSql() |
| 103 | assert.Equal(t, "SELECT test WHERE x = ? AND y = ?", sql) |
| 104 | |
| 105 | sql, _, _ = b.PlaceholderFormat(Dollar).ToSql() |
| 106 | assert.Equal(t, "SELECT test WHERE x = $1 AND y = $2", sql) |
| 107 | |
| 108 | sql, _, _ = b.PlaceholderFormat(Colon).ToSql() |
| 109 | assert.Equal(t, "SELECT test WHERE x = :1 AND y = :2", sql) |
| 110 | |
| 111 | sql, _, _ = b.PlaceholderFormat(AtP).ToSql() |
| 112 | assert.Equal(t, "SELECT test WHERE x = @p1 AND y = @p2", sql) |
| 113 | } |
| 114 | |
| 115 | func TestSelectBuilderRunners(t *testing.T) { |
| 116 | db := &DBStub{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…