MCPcopy
hub / github.com/jmoiron/sqlx / StructScan

Function StructScan

sqlx.go:1005–1008  ·  view source on GitHub ↗

FIXME: StructScan was the very first bit of API in sqlx, and now unfortunately it doesn't really feel like it's named properly. There is an incongruency between this and the way that StructScan (which might better be ScanStruct anyway) works on a rows object. StructScan all rows from an sql.Rows or

(rows rowsi, dest interface{})

Source from the content-addressed store, hash-verified

1003// allocate structs for the entire result, use Queryx and see sqlx.Rows.StructScan.
1004// If rows is sqlx.Rows, it will use its mapper, otherwise it will use the default.
1005func StructScan(rows rowsi, dest interface{}) error {
1006 return scanAll(rows, dest, true)
1007
1008}
1009
1010// reflect helpers
1011

Callers 2

TestMissingNamesFunction · 0.85

Calls 1

scanAllFunction · 0.85

Tested by 2

TestMissingNamesFunction · 0.68