Skip to content

Tidy README and document Postgres native-enum interop#2

Merged
dmytro-khmara merged 1 commit intomasterfrom
tidy-readme
Apr 27, 2026
Merged

Tidy README and document Postgres native-enum interop#2
dmytro-khmara merged 1 commit intomasterfrom
tidy-readme

Conversation

@dmytro-khmara
Copy link
Copy Markdown
Member

Summary

Same readability pass applied across the StrEnum family (StrEnum, StrEnum.EntityFrameworkCore, StrEnum.AspNetCore, StrEnum.System.Text.Json), plus a new section flagging the native Postgres enum interop story.

Tidy

  • Allows to useLets you use; trailing-period fix on the support line.
  • You can install ... usingInstall ... via.
  • New ### Defining a string enum and an entity heading so the first usage block isn't headless.
  • Tightens the assembly-loading paragraph and the IN-clause workaround prose; aligns code-sample formatting.
  • Bumps the copyright year (2022 → 2026) and corrects the author name (Dmitry KhmaraDmytro Khmara) to match the rest of the family.

New: Postgres native enum columns

Documents that StrEnum.Dapper's text-flattening handler hits 42804: column ... is of type my_enum but expression is of type text against native PG enum columns, since Postgres has no implicit text → enum cast. Two practical workarounds are shown:

  • Add ::your_enum to the parameter site in SQL.
  • Pass a hand-rolled NpgsqlParameter with DataTypeName set, via DynamicParameters.

Also points raw-Npgsql-only consumers at StrEnum.Npgsql, and notes that there isn't a first-class StrEnum.Npgsql.Dapper integration today.

No code changes.

Test plan

  • Render the README and verify formatting / new section
  • Confirm the PG-enum workaround code samples are syntactically correct

@dmytro-khmara dmytro-khmara merged commit 7109ff5 into master Apr 27, 2026
1 check passed
@dmytro-khmara dmytro-khmara deleted the tidy-readme branch April 27, 2026 18:25
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