3 ms·
Stupid me, I was using enums the wrong way. I was using an enum like a constant. I.E. If my database takes a 'Sex' parameter, with Male as 1, Female as 2, Unkn
by nobodysfool 13y ago
Stupid me, I was using enums the wrong way. I was using an enum like a constant.
I.E. If my database takes a 'Sex' parameter, with Male as 1, Female as 2, Unknown as 3, Both as 4 - I'd use an enum like so:
update person set sex=Sex.Male
Looks like I can't do that with this enum class.
Well, I suppose I'd have to do it like so:
sex = Sex.Male.value
not very sexy...
- bsimpson 13y agoWouldn't IntEnum fit your case better?