Skip to content

feat: add PostgreSQL typed parameter support - #11

Merged
rodri-oliveira-dev merged 11 commits into
mainfrom
feat/issue-8-postgresql-provider
Aug 28, 2026
Merged

feat: add PostgreSQL typed parameter support#11
rodri-oliveira-dev merged 11 commits into
mainfrom
feat/issue-8-postgresql-provider

Conversation

@rodri-oliveira-dev

Copy link
Copy Markdown
Owner

Summary

Adds a provider-specific PostgreSQL package for Dapper typed parameters using Npgsql. The new provider keeps PostgreSQL metadata explicit at the call site through NpgsqlDbType, while preserving the existing SQL Server package contract.

What changed

  • New TypedParameters.Dapper.PostgreSql package.
  • PostgreSQL TypedPostgresParameter core parameter implementation.
  • PostgresParam factories for scalar values.
  • JSON support through distinct json and jsonb factories.
  • Temporal support for date, time, timestamp, timestamptz, and interval.
  • Native PostgreSQL array support with explicit element types.
  • Unit and Testcontainers integration tests for PostgreSQL.
  • CI validation for both providers and both target frameworks.
  • Release workflow updates for independent multi-provider packages.
  • Public docs, provider guide, and changelog updates.

Architecture

SQL Server and PostgreSQL remain provider-specific packages because their database contracts and ADO.NET provider APIs are meaningfully different. The branch intentionally avoids a shared TypedDbParameter abstraction so SQL Server features such as output parameters and TVPs do not leak into PostgreSQL, and PostgreSQL features such as arrays, JSON, and timestamp semantics stay explicit.

Validation

  • dotnet --info
  • dotnet restore Dapper.TypedParameters.sln
  • dotnet build Dapper.TypedParameters.sln --configuration Release --no-restore
  • SQL Server unit tests: net8.0, net10.0
  • PostgreSQL unit tests: net8.0, net10.0
  • SQL Server integration tests: net8.0, net10.0
  • PostgreSQL integration tests: net8.0, net10.0
  • dotnet pack for both provider packages
  • RunPackageValidation for both provider packages
  • package contents validation for both provider packages
  • package consumption validation for both provider packages on net8.0 and net10.0
  • dependency vulnerability audit with dotnet list package --vulnerable --include-transitive

Packages

  • TypedParameters.Dapper.SqlServer
  • TypedParameters.Dapper.PostgreSql

Release pipeline

The release workflow now validates, packs, and publishes the two provider packages separately. Each package keeps its own NuGet identity and package validation path, and the workflow produces independent .nupkg and .snupkg artifacts before publication.

Closes #8

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19782d8655

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml
Comment thread src/Dapper.TypedParameters.PostgreSql/TypedPostgresParameter.cs
@rodri-oliveira-dev
rodri-oliveira-dev merged commit 99506c3 into main Aug 28, 2026
10 checks passed
@rodri-oliveira-dev
rodri-oliveira-dev deleted the feat/issue-8-postgresql-provider branch August 28, 2026 20:32
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.

Add PostgreSQL typed parameter support using Npgsql

1 participant