Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Typesafe SQL in Java

255 views

Published on

Write Typesafe SQL in Java using JOOQ

Published in: Software
  • Be the first to comment

  • Be the first to like this

Typesafe SQL in Java

  1. 1. Typesafe SQL in Java Softwerkskammer Sachsen Meetup 26. Mai 2020
  2. 2. Dominik Hirt
  3. 3. Das Problem
  4. 4. (K)eine großen Freunde
  5. 5. Viele „Lösungen“ Hibernate / HQL Spring Data Derived Query Method und viele andere ORM’s JPA / JPQL JIRA / JQL Aber Hibernate im Jahr #19
  6. 6. ColumnType Checks
  7. 7. Entity Attribute Refactoring [ Spring Data Derived Query Methods ]
  8. 8. Complex Query Strings
  9. 9. #epicfail
  10. 10. Criteria API
  11. 11. Die Lösung
  12. 12. ArbitraryType Fetching endlich überall Projections
  13. 13. Entity Attribute Refactoring Hurra, ein compile error
  14. 14. Complex Query Strings
  15. 15. Complex Query Strings II
  16. 16. Complex Query Strings III
  17. 17. JOOQ to the rescue ! https://www.jooq.org/
  18. 18. JAVA OBJECT ORIENTED QUERYING • query builder framework • Java DSL • DB Schema im Zentrum • Typesafe • OpenSource / kommerziell
  19. 19. Wie DB Schema Java Quellen
  20. 20. DB Migration jooq generator
  21. 21. lots of generator options generate POJOs generate DAOs generate from liquibase changelogsimple crud with (generated) records lots of fetching options return values on store nearly 1:1 from sql to java code
  22. 22. Dynamic Where Clause
  23. 23. noch die Criteria API aber KEINE Projections möglich, nur Entities
  24. 24. <DEMO>
  25. 25. dominik @ todo42.de

×