MCPcopy
hub / github.com/jackc/pgx / TestConnQueryScanGoArray

Function TestConnQueryScanGoArray

stdlib/sql_test.go:494–503  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

492}
493
494func TestConnQueryScanGoArray(t *testing.T) {
495 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {
496 m := pgtype.NewMap()
497
498 var a []int64
499 err := db.QueryRow("select '{1,2,3}'::bigint[]").Scan(m.SQLScanner(&a))
500 require.NoError(t, err)
501 assert.Equal(t, []int64{1, 2, 3}, a)
502 })
503}
504
505func TestConnQueryScanArray(t *testing.T) {
506 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {

Callers

nothing calls this directly

Calls 5

SQLScannerMethod · 0.95
NewMapFunction · 0.92
ScanMethod · 0.65
QueryRowMethod · 0.65

Tested by

no test coverage detected