샘플
Handle NULL struct scans via pointers or pgtype, prevent column-mismatch errors in RowToStructByName(Lax), and safely release pgxpool connections without post-release panics
sha256:4eb6eee48a60e79da9dcf4055256991997f094a1da19ee17cfe0697e6d6d7b32
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle NULL struct scans via pointers or pgtype, prevent column-mismatch errors in RowToStructByName(Lax), and safely release pgxpool connections without post-release panics HOW
- 패키지
- github.com/jackc/pgx/v5 v5.10.0
- 환경
- go
- 생성일
- 2026-08-15T11:25:24Z
컨트랙트
- assert RowToStructByName fails when scanning NULL into plain Go scalar type
- assert RowToStructByName succeeds with nil for *T and Valid=false for pgtype types on NULL
- assert RowToStructByName fails on missing columns, while RowToStructByNameLax allows missing columns in row
- assert RowToStructByNameLax fails when row contains extra columns not in struct
- assert RowToStructByPos ignores fields tagged with db:"-"
- assert pgxpool.Conn panics on Conn() or Exec() after Release(), but multiple Release() calls do not panic
파일
- NOTES.md
- csx.json
- go.mod
- go.sum
- mock.go
- sample_test.go
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-15 · ed25519:d91480838ac982c9