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

Function ExampleSelectBuilder_Columns

select_test.go:363–369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

361}
362
363func ExampleSelectBuilder_Columns() {
364 query := Select("id").Columns("created", "first_name").From("users")
365
366 sql, _, _ := query.ToSql()
367 fmt.Println(sql)
368 // Output: SELECT id, created, first_name FROM users
369}
370
371func ExampleSelectBuilder_Columns_order() {
372 // out of order is ok too

Callers

nothing calls this directly

Calls 4

SelectFunction · 0.85
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…