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

Function TestRemoveColumns

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

Source from the content-addressed store, hash-verified

453}
454
455func TestRemoveColumns(t *testing.T) {
456 query := Select("id").
457 From("users").
458 RemoveColumns()
459 query = query.Columns("name")
460 sql, _, err := query.ToSql()
461 assert.NoError(t, err)
462 assert.Equal(t, "SELECT name FROM users", sql)
463}

Callers

nothing calls this directly

Calls 5

SelectFunction · 0.85
RemoveColumnsMethod · 0.80
ToSqlMethod · 0.65
FromMethod · 0.45
ColumnsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…