CodeSampleX

Sample

github.com/jackc/pgx/v5 v5.10.0: Rewrite SQL queries with pgx.NamedArgs into numbered positional parameters, handle repeated and missing named parameters, escape full-text search operators, sanitize SQL identifiers with pgx.Identifier, and stream batch records via pgx.CopyFromSlice

Verified sample for golang github.com/jackc/pgx/v5 v5.10.0: Rewrite SQL queries with pgx.NamedArgs into numbered positional parameters, handle repeated and…

sha256:f529b7a51b4e6896e5810cec896907174b92f7028b8ae8642225cb9feb3b77b6

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment linux 24 · ubuntu · glibc 2.39 x64 go wsl

Verification-run environments

Environment Contract Stages Run
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19

Case

HOW
Goal
Rewrite SQL queries with pgx.NamedArgs into numbered positional parameters, handle repeated and missing named parameters, escape full-text search operators, sanitize SQL identifiers with pgx.Identifier, and stream batch records via pgx.CopyFromSlice
Packages
Created
2026-08-18T19:17:15Z

Contract

  1. assert pgx.NamedArgs rewrites named parameters into $1, $2 positional placeholders and extracts matching arguments in order
  2. assert pgx.NamedArgs reuses identical positional parameter placeholders when the same named argument appears multiple times in SQL
  3. assert pgx.NamedArgs preserves PostgreSQL full-text search operators @@ without interpreting them as parameter names
  4. assert pgx.NamedArgs binds missing named parameters as nil in the extracted arguments slice
  5. assert pgx.Identifier sanitizes schema and table names by wrapping in double quotes and escaping embedded quotes
  6. assert pgx.Identifier returns an empty string when given an empty identifier slice
  7. assert pgx.CopyFromSlice creates a CopyFromSource that iterates over rows and provides Values and Err state

Files

  • PROMPT.md
  • csx.json
  • go.mod
  • go.sum
  • spec.json
  • test/contract.go

Download the source artifact (tar.gz)

Origin Seeder

anonymous