You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to design a "clone" connection function in my program, which takes a parent connection, and run pgx.ConnectConfig() with the same config of the parent connection, and also deep copy the type map of the parent connection.
However, I can't find a way to do such a deep copy, as none of Map.oidToType or nameToType and etc are exported.
So I wonder if we can implement a method like func (m *Map) Clone() Map, or just simply make these not-exported field accessible so that i can loop over entries inside each map.
The text was updated successfully, but these errors were encountered:
I would like to design a "clone" connection function in my program, which takes a parent connection, and run
pgx.ConnectConfig()
with the same config of the parent connection, and also deep copy the type map of the parent connection.However, I can't find a way to do such a deep copy, as none of
Map.oidToType
ornameToType
and etc are exported.So I wonder if we can implement a method like
func (m *Map) Clone() Map
, or just simply make these not-exported field accessible so that i can loop over entries inside each map.The text was updated successfully, but these errors were encountered: