Skip to content

Add _uuid (UUID array) codec#1324

Open
nigredo-tori wants to merge 2 commits into
typelevel:mainfrom
nigredo-tori:1310-uuid-array
Open

Add _uuid (UUID array) codec#1324
nigredo-tori wants to merge 2 commits into
typelevel:mainfrom
nigredo-tori:1310-uuid-array

Conversation

@nigredo-tori

Copy link
Copy Markdown

Fixes #1310

import skunk.data.Type
import skunk.data.Arr

trait UuidCodec {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is now slightly wrong because we have multiple codecs, but it doesn't seem worth fixing while keeping binary compatibility.

)
Codec.simple[UUID](_.toString, codec.uuid.parse, Type.uuid)

def _uuid: Codec[Arr[UUID]] = codec.uuid._uuidImpl

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, we can't add values directly to trait lest MiMa complains. Does anyone have a better way to do this?

@nigredo-tori

Copy link
Copy Markdown
Author

I'm not quite sure what to make of the Native test failing, since I have literally zero Native experience.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add _uuid array codec

1 participant