Open schveiguy opened 11 months ago
The 5 types included in ColumnData are long, double, string, immutable(ubyte)[] and typeof(null).
ColumnData
long
double
string
immutable(ubyte)[]
typeof(null)
There is no need to involve std.Variant for this. There's even a tag in the ColumnData type already!
std.Variant
Just a simple tagged union should suffice, there are no lifetime issues to deal with, all these are POD.
So switch to sumtype ? :)
Even sumtype is overkill IMO.
But the main reason I would want to switch is, std.variant is unsafe. It's why I switched away from it in mysql-native.
The 5 types included in
ColumnData
arelong
,double
,string
,immutable(ubyte)[]
andtypeof(null)
.There is no need to involve
std.Variant
for this. There's even a tag in the ColumnData type already!Just a simple tagged union should suffice, there are no lifetime issues to deal with, all these are POD.