Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 column to be mapped from []uint8 #976

Open
lspgn opened this issue Apr 20, 2023 · 3 comments
Open

IPv6 column to be mapped from []uint8 #976

lspgn opened this issue Apr 20, 2023 · 3 comments

Comments

@lspgn
Copy link
Contributor

lspgn commented Apr 20, 2023

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

case *uint32:

(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.

@jkaflik
Copy link
Contributor

jkaflik commented Apr 24, 2023

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.

@rogeryk
Copy link
Contributor

rogeryk commented Feb 27, 2024

@jkaflik this issue have been solved.

@gogingersnap777
Copy link
Contributor

@jkaflik Looking through good first issues and this looks like it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants