DapperLib / DapperLib/Dapper.Contrib

Postgres Insert Error

Open
#43 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
293
Forks
109
PR merge metrics
No merged PRs in 30d

Description

i use postgres when i insert data, throw exception: not found "id".
I track the source code,I guess the reason is: my table field is uppercase caused.

because postgres rules : Uppercase must be enclosed in double quotes.

but source code: Dapper.Contrib=>SqlMapperExtensions=>PostgresAdapter back insret returning key not add double quotes where table field is uppercase.

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Dapper.Contrib's SqlMapperExtensions.PostgresAdapter, focusing on the insert-and-returning-key path described in the issue. Reproduce an insert against a PostgreSQL table with an uppercase field, then verify that the generated statement handles the identifier correctly and the insert returns the key without a not-found exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, postgresql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.