Commit 0c3e3f8
committed
[BUG5][BUG6] Escape DELETE sqlLine + quote UPDATE idents + 0.9.2-beta
BUG5: GenerateDeleteMethod built sqlLine with literal " characters
(BUG3 fix added them) and embedded the result inside a C# verbatim
string @"...". A literal " inside @"..." closes the literal, so the
generated .g.cs failed to compile (CS1022). Fix: pre-compute
sqlLineVerbatim = sqlLine.Replace("\"", "\"\"") and interpolate
that into both NpgsqlConnection + Transaction overloads.
BUG6: GenerateUpdateMethod was missed by the BUG3 sweep entirely.
The setClauses, whereClauses, and the `UPDATE {schema}.{name}`
template were emitted bare. PostgreSQL folded mixed-case names
(fhir_Patient -> fhir_patient) and the statement failed at runtime.
Fix: quote every identifier in the UPDATE codegen using the `""`
verbatim escape form (matches the INSERT path), in both
NpgsqlConnection + Transaction overloads.
Verified locally:
- repro: GenerateUpdate=true, GenerateDelete=true on fhir_Patient
- generated UPDATE: UPDATE "public"."fhir_Patient" SET "Active" = @Active WHERE "Id" = @id
- generated DELETE: DELETE FROM "public"."fhir_Patient" WHERE "Id" = @id
- compile-tested .g.cs as a class library: 0 errors, 0 warnings.
Bump Directory.Build.props to 0.9.2-beta.1 parent a2bb191 commit 0c3e3f8
File tree
2 files changed
+29
-10
lines changed- DataProvider/DataProvider
2 files changed
+29
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
1016 | | - | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1017 | 1028 | | |
1018 | 1029 | | |
1019 | 1030 | | |
| |||
1031 | 1042 | | |
1032 | 1043 | | |
1033 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
1034 | 1047 | | |
1035 | 1048 | | |
1036 | | - | |
| 1049 | + | |
1037 | 1050 | | |
1038 | 1051 | | |
1039 | 1052 | | |
| |||
1072 | 1085 | | |
1073 | 1086 | | |
1074 | 1087 | | |
| 1088 | + | |
1075 | 1089 | | |
1076 | 1090 | | |
1077 | | - | |
| 1091 | + | |
1078 | 1092 | | |
1079 | 1093 | | |
1080 | 1094 | | |
| |||
1146 | 1160 | | |
1147 | 1161 | | |
1148 | 1162 | | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
| 1163 | + | |
| 1164 | + | |
1152 | 1165 | | |
1153 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1154 | 1173 | | |
1155 | 1174 | | |
1156 | 1175 | | |
| |||
1169 | 1188 | | |
1170 | 1189 | | |
1171 | 1190 | | |
1172 | | - | |
| 1191 | + | |
1173 | 1192 | | |
1174 | 1193 | | |
1175 | 1194 | | |
| |||
1207 | 1226 | | |
1208 | 1227 | | |
1209 | 1228 | | |
1210 | | - | |
| 1229 | + | |
1211 | 1230 | | |
1212 | 1231 | | |
1213 | 1232 | | |
| |||
| 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