Documentation Feedback
I missing following in the doc:
- Concrete complete examples how to register custom composit types and enum and how to register it bulletproof in ConnInfo in AfterConnect.
type MyEnumTypeString string
// ...
type MySimpleCompTypeStruct struct {
A string
B string
}
// ...
-
How exactly
pgtype.DataType,pgtype.Value,pgtype.ValueTypeandmy concrete go typeI want to use (e.g.MyEnumTypeString,MySimpleCompTypeStruct) works together, how register it that it works smoothly in exec/query params but als rows result set (so automatic conversion ofMySimpleCompTypeStructandMyEnumTypeStringin row.Values()). At best the example should be withoutpgtype.Status. A more common and implementation are simple nillable params without own status logic - so similar to thepgtype.zeronullpackage. -
A decision tree how
Preferred methods,Binary codec methods,Text codec methods,ScanValuer,format code in query params,String method, anddefaultis used - in query params and row.Values (auto type creation).
TODO: i must maybe clearify this issue but created it already because it took lot of time to understand the working of the typesystem