Skip to content

Narrow generated JSON types#2

Closed
tylergannon wants to merge 1 commit into
pagerguild:mainfrom
tylergannon:json-value-types
Closed

Narrow generated JSON types#2
tylergannon wants to merge 1 commit into
pagerguild:mainfrom
tylergannon:json-value-types

Conversation

@tylergannon

Copy link
Copy Markdown
Contributor

Summary

  • emit generated JsonValue aliases for PostgreSQL json/jsonb instead of any
  • wrap scalar JSON parameters with sql.json(...), preserving SQL NULL for nullable params
  • fail on missing sqlc type metadata instead of falling back to any
  • extend examples and docs for nullable/non-nullable jsonb

Verification

  • just test
  • just lint
  • npx tsc --noEmit (examples/node-postgres)
  • bunx tsc --noEmit (examples/bun-postgres)

CI also rebuilds the WASM plugin and verifies generated examples with sqlc diff.

@tylergannon

Copy link
Copy Markdown
Contributor Author

Closing: opened against the wrong repository. The intended target is tylergannon/sqlc-gen-typescript.

@tylergannon tylergannon closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant