MCPcopy
hub / github.com/Masterminds/squirrel / TestSelectWithOptions

Function TestSelectWithOptions

select_test.go:191–196  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

189}
190
191func TestSelectWithOptions(t *testing.T) {
192 sql, _, err := Select("*").From("foo").Distinct().Options("SQL_NO_CACHE").ToSql()
193
194 assert.NoError(t, err)
195 assert.Equal(t, "SELECT DISTINCT SQL_NO_CACHE * FROM foo", sql)
196}
197
198func TestSelectWithRemoveLimit(t *testing.T) {
199 sql, _, err := Select("*").From("foo").Limit(10).RemoveLimit().ToSql()

Callers

nothing calls this directly

Calls 5

SelectFunction · 0.85
DistinctMethod · 0.80
ToSqlMethod · 0.65
OptionsMethod · 0.45
FromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…