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

Function ExampleSelectBuilder_Scan

select_test.go:380–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

378}
379
380func ExampleSelectBuilder_Scan() {
381
382 var db *sql.DB
383
384 query := Select("id", "created", "first_name").From("users")
385 query = query.RunWith(db)
386
387 var id int
388 var created time.Time
389 var firstName string
390
391 if err := query.Scan(&id, &created, &firstName); err != nil {
392 log.Println(err)
393 return
394 }
395}
396
397func ExampleSelectBuilder_ScanContext() {
398

Callers

nothing calls this directly

Calls 4

SelectFunction · 0.85
ScanMethod · 0.65
FromMethod · 0.45
RunWithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…