Bug
PostgreSQL identifiers and enum labels can contain double quotes, backslashes, and control characters. The Swift type generator currently interpolates enum raw values and CodingKeys raw values directly into quoted Swift literals. For example, a value containing a double quote terminates the literal early, and swiftc -parse rejects the generated source.
Reproduction
Generate Swift types for an enum label or column name containing a double quote and pipe the result to swiftc -parse -. The parser reports an unterminated string literal and invalid declarations.
Expected behavior
Generated Swift string literals should escape database-provided values while preserving the original raw enum label or coding key. Ordinary values should retain their current output.
Bug
PostgreSQL identifiers and enum labels can contain double quotes, backslashes, and control characters. The Swift type generator currently interpolates enum raw values and CodingKeys raw values directly into quoted Swift literals. For example, a value containing a double quote terminates the literal early, and
swiftc -parserejects the generated source.Reproduction
Generate Swift types for an enum label or column name containing a double quote and pipe the result to
swiftc -parse -. The parser reports an unterminated string literal and invalid declarations.Expected behavior
Generated Swift string literals should escape database-provided values while preserving the original raw enum label or coding key. Ordinary values should retain their current output.