IPv6 column to be mapped from []uint8
Hello! Thank you for this great library!
Is your feature request related to a problem? Please describe.
I am trying to insert data into an IPv6 column. The real type is a FixedString(16) inside ClickHouse.
The Append function of the library requires the underlying type to be:
- string
- netip.Addr
- net.IP
I would prefer to avoid manipulating my array and insert the data directly.
Describe the solution you'd like
When looking at the IPv4 column, there is a way to pass a uint32 https://github.com/ClickHouse/clickhouse-go/blob/558434c679185cbf403018ebd6c74748d846343b/lib/column/ipv4.go#L74
(this was added with #966)
For IPv6, strings are currently parsed and then the bytes are inserted. I would like to be able to pass a [16]byte or a []uint8 (byte array).
Describe alternatives you've considered
Ended up using netip.AddrFrom16() but I'd like to avoid a cast or pass a pointer to the byte array I already have.
Hi @lspgn
Thanks for this request. This will likely not be a priority for me to implement in the upcoming weeks. If someone from the community wants to work on it - I am happy to merge PR.
@jkaflik this issue have been solved.
@jkaflik Looking through good first issues and this looks like it can be closed.