tomjaguarpaw / haskell-opaleye

Other
599 stars 115 forks source link

add `PGVarcharN` #527

Closed stevemao closed 2 years ago

stevemao commented 2 years ago

I think it makes sense to use PGString where possible.

Haven't added any test but want to get some early reviews.

tomjaguarpaw commented 2 years ago

Hi, sorry I haven't given this a thorough review yet. I suspect for an early design it would be simplest to add only SqlVarcharN and conversions to and from SqlText. Hopefully I'll be able to get back to this in the near future.

tomjaguarpaw commented 2 years ago

OK, so for now I am considering adding only SqlVarcharN and conversions to and from SqlText. Would that work for you? Extending (.++), stringAgg and so on doesn't seem very useful as the VARCHAR is likely to overflow. What do you think?

stevemao commented 2 years ago

No problem. Will update this PR.

stevemao commented 2 years ago

Just updated the PR.

tomjaguarpaw commented 2 years ago

Looking good, thanks! I'll make some minor edits and then merge. Please ping me if you feel I'm taking too long.

tomjaguarpaw commented 2 years ago

OK, I've merged this separately and published at https://hackage.haskell.org/package/opaleye-0.7.6.0

Thanks for the contribution!

stevemao commented 2 years ago

Thank you so much!

tomjaguarpaw commented 2 years ago

You're welcome. Please let me know if you encounter any difficulties.