sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

feat(sqlc): support emit_pointers_for_null_types for enums

Open godwhoa opened this issue 1 year ago • 2 comments
trafficstars

godwhoa avatar Jan 02 '24 14:01 godwhoa

I think this might not be enough. Do we not also need to modify the scanning code for the non-nullable enum types so that they properly return a nil pointer when they scan a NULL? Or does this somehow "just work"?

Have you tried manually modifying the sqlc output to use pointers for nullable enums and confirmed that this proposed change alone does actually work as expected?

andrewmbenton avatar Jan 04 '24 21:01 andrewmbenton

@andrewmbenton I did try with a basic INSERT RETURNING locally which worked, but didn't try any more elaborate cases that you mention. Will try to pick it up over the week. Also, looks like CI isn't working on my PR any clue why?

godwhoa avatar Jan 10 '24 06:01 godwhoa