aaberg / sql2o

sql2o is a small library, which makes it easy to convert the result of your sql-statements into objects. No resultset hacking required. Kind of like an orm, but without the sql-generation capabilities. Supports named parameters.
http://sql2o.org
MIT License
1.14k stars 230 forks source link

Converters Have Been Created for `java.time.LocalDate` and `java.time.LocalDateTime` Classes #364

Closed agitrubard closed 5 months ago

agitrubard commented 6 months ago

Description:

This pull request introduces a converter to accurately extract "java.time.LocalDateTime" instances from the database and map them correctly, extending support for the "java.time.LocalDate" class as well.

Why:

Changes:

Acceptance of Your Contributions:

This change is made to align with the requirements of modern Java applications and enhance code quality. We welcome your feedback and any further corrections related to this matter.

aaberg commented 6 months ago

Hi @agitrubard, Thanks for submitting these converters, which I agree are missing in Sql2o. Can I persuade you to write some tests that verify that they work as expected? When that is done, I'll be happy to merge your contribution.

agitrubard commented 6 months ago

Hi @agitrubard, Thanks for submitting these converters, which I agree are missing in Sql2o. Can I persuade you to write some tests that verify that they work as expected? When that is done, I'll be happy to merge your contribution.

@aaberg Thank you for reviewing my contribution and taking the time to assess my pull request. Following your feedback, I have added the missing tests and resolved the conflict. I hope everything now aligns with your expectations as you review the changes. You can also verify the conflict resolution adjustments I made. If there's any further refinement required or if you have additional feedback, please feel free to let me know.

Thank you again for your time and consideration. Looking forward to your positive feedback!

aaberg commented 5 months ago

As this PR correctly states, java.time integration is essential since java.time classes are recommended for date and time representation. I'm closing this PR, since I'm not convinced it solves the integration with a robust enough solution, and the tests aren't good enough. Take a look at this alternative implementation that will get merged instead. https://github.com/aaberg/sql2o/pull/367