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

fix inserting single PG enum #100

Merged
merged 4 commits into from
Feb 2, 2025
Merged

fix inserting single PG enum #100

merged 4 commits into from
Feb 2, 2025

Conversation

AugustNagro
Copy link
Owner

closes #94

Copy link

@KaranAhlawat KaranAhlawat left a comment

Choose a reason for hiding this comment

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

The rest looks right, although I'm not the most well-versed in metaprogramming, but the implementation made sense to me.

import quotes.reflect.*
val mirror = Expr.summon[Mirror.SumOf[A]].getOrElse {
report.errorAndAbort(
"Can only derive SqlArrayCodec for simple (non ADT) Enums"

Choose a reason for hiding this comment

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

SqlArrayCodec should be EnumDbCodec, or a variant of it, no?

@AugustNagro AugustNagro merged commit ad611ce into master Feb 2, 2025
1 check passed
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.

Inserting a PG enum
2 participants