-
Notifications
You must be signed in to change notification settings - Fork 22
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
[WIP] Add generic derivation to org.bson.BsonValue #19
base: master
Are you sure you want to change the base?
Conversation
Wow, this is beyond my understanding of Scala 😅 Sorry, I've just pushed some changes which might interfere with your PR |
What I want is to use I have added a small PoC: https://github.com/Kirill5k/mongo4cats/blob/7a4890d82a2291d9e8da243fdd0d2ae6d4ed2bb4/bson-derivation/src/test/scala-2/mongo4cats/MongoBsonCollectionSpec.scala |
I've had added some benches. Read:
Write:
|
From my part, I have no more time to work on this. This PoC is highly unsafe/low-level (reduce the allocations as much as possible) in comparison to the safety of Circe. |
Add Magnolia generic derivation to
org.bson.BsonValue
for Scala2.12
,2.13
and3
(with minimalist test).The aim of this work is to encode/decode like
mongo4cats-circe
but directly from ADT toorg.bson.BsonValue
.Tests using:
$ sbt "~+mongo4cats-bson-derivation/testQuick"