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

Function TestConnSimpleSlicePassThrough

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

Source from the content-addressed store, hash-verified

481}
482
483func TestConnSimpleSlicePassThrough(t *testing.T) {
484 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {
485 skipCockroachDB(t, db, "Server does not support cardinality function")
486
487 var n int64
488 err := db.QueryRow("select cardinality($1::text[])", []string{"a", "b", "c"}).Scan(&n)
489 require.NoError(t, err)
490 assert.EqualValues(t, 3, n)
491 })
492}
493
494func TestConnQueryScanGoArray(t *testing.T) {
495 testWithAllQueryExecModes(t, func(t *testing.T, db *sql.DB) {

Callers

nothing calls this directly

Calls 4

skipCockroachDBFunction · 0.70
ScanMethod · 0.65
QueryRowMethod · 0.65

Tested by

no test coverage detected