샘플
Avoid DSN RuntimeParams pollution by distinguishing pgx and pgxpool ParseConfig, enforce Simple Protocol for multi-statement execution, and scan nullable array elements into pointer or pgtype slices
sha256:ff6af08598a4e3fc137ed941f6d4febe37974700677148ef2b547bef8cdf052c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Avoid DSN RuntimeParams pollution by distinguishing pgx and pgxpool ParseConfig, enforce Simple Protocol for multi-statement execution, and scan nullable array elements into pointer or pgtype slices HOW
- 패키지
- github.com/jackc/pgx/v5 v5.10.0
- 환경
- go
- 생성일
- 2026-08-16T06:22:07Z
컨트랙트
- assert pgx.ParseConfig routes pool options into RuntimeParams while pgxpool.ParseConfig extracts them
- assert pgx.ParseConfig configures statement_cache_capacity and default_query_exec_mode without RuntimeParams pollution
- assert default QueryExecModeCacheStatement rejects multi-statement SQL strings while QueryExecModeSimpleProtocol succeeds
- assert scanning SQL arrays with NULL elements fails for []T but succeeds for []*T and []pgtype.Int4
- assert scanning SQL NULL array yields nil slice whereas SQL empty array {} yields non-nil slice
- assert pgtype.FlatArray flattens multi-dimensional PostgreSQL arrays into 1D Go slices
- assert pgx.Batch stops subsequent executions on query failure and BatchResults.Close returns the first error
- assert pgtype.Numeric handles fractional decimals, NaN, and Infinity modifiers without loss of precision
파일
- 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-16 · ed25519:d91480838ac982c9