-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement zio-jdbc
backend
#57
Conversation
Thanks @guizmaii - you're fast! I noticed you found my link to
|
30e32c6
to
fa8835e
Compare
If you're bothered by the files in I track all generated files in git as a kind of snapshot tests. I also continuously commit them to git as I work and use git diff to preview the effect my changes have. It's a very, very powerful technique for working on code generation code.
|
Yup, we completely agree on this. I do the same thing 🙂 I'm not committing them for now to avoid having a huuuuuuuge PR |
There's a bug in zio-jdbc that makes the tests fail in Scala 2.12. See zio-archive/zio-jdbc#185 |
Test are now passing on all Scala versions 🎉 |
We're quite close then! 🚀 I hope to be able to dig up some time tonight after Halloween celebrations :) |
discovered zio-archive/zio-jdbc#188 while verifying. will push tests to this branch shortly |
we can move forward with that one test commented out by the way, it's strictly not our problem and it may be hard to solve well in zio-jdbc. |
todo:
|
- lose explicit `ClassTag` in `arrayJdbcDecoder`. will add it everywhere if we determine that it makes a big difference - try a somewhat new code style in DbLibZioJdbc. a bit less nesting and a bit more naming. try to line up `|` in code fragments at least. - compress `arrayJdbcDecoder` for custom types - add `ParameterMetadata.instance` to avoid generating some bytecode and slightly nicer looking generated code
I'm ready to merge this now, just need a new release of zio-jdbc. 🚀 |
I asked for a release |
new version has been released https://github.com/zio/zio-jdbc/releases/tag/v0.1.1 🎉 |
Adapted from the doobie backend
Needs:
JdbcDecoder
,JdbcEncoder
andSetter
summoners zio-archive/zio-jdbc#162UUID
JdbcDecoder
instance zio-archive/zio-jdbc#164scala.math.BigDecimal
JdbcDecoder
instance zio-archive/zio-jdbc#165java.time.*
encoders and decoders zio-archive/zio-jdbc#166JdbcDecoder
,JdbcEncoder
andSetter
summoners zio-archive/zio-jdbc#167java.time.*
encoders and decoders (exceptjava.time.OffsetTime
) zio-archive/zio-jdbc#171ZConnectionPoolConfig
if the connection fails, it'll retry forever to try to connect and will deadlock the program zio-archive/zio-jdbc#174bigDecimalDecoderScala
for Scala 2.12 zio-archive/zio-jdbc#185