Commit a2bb191
committed
[BUG4] Strip ident quotes in offline SELECT codegen + 0.9.1-beta
PostgresCli.InferColumnTypesFromSql parsed `"Id"` and
`"fhir_Patient"."Active"` from user SQL and emitted the
quote chars verbatim into the C# property name, producing
uncompilable .g.cs (`public string? "Id" { get; init; }`).
Fix: StripIdentifierQuotes() removes a single surrounding pair
of double quotes from the parsed column ref before it becomes
a C# identifier. SQL constant emission unchanged — quoted SQL
still round-trips correctly via the verbatim "" escape.
Verified locally with repro:
- input: SELECT "Id", "fhir_Patient"."Active" FROM "fhir_Patient"
- before: public string? "Id" { get; init; } (broken)
- after: public string? Id { get; init; } (compiles)
Bump Directory.Build.props to 0.9.1-beta.1 parent 8a5c588 commit a2bb191
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
468 | 473 | | |
469 | 474 | | |
470 | 475 | | |
| 476 | + | |
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
| |||
488 | 494 | | |
489 | 495 | | |
490 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
491 | 512 | | |
492 | 513 | | |
493 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments