SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Typesafe SQL in Java
Softwerkskammer Sachsen Meetup 26. Mai 2020
Dominik Hirt
Das Problem
(K)eine großen Freunde
Viele „Lösungen“
Hibernate / HQL Spring Data
Derived Query Method
und viele
andere ORM’s
JPA / JPQL
JIRA / JQL
Aber Hibernate im Jahr #19
ColumnType Checks
Entity Attribute Refactoring
[ Spring Data Derived Query Methods ]
Complex Query Strings
#epicfail
Criteria API
Die Lösung
ArbitraryType Fetching
endlich überall
Projections
Entity Attribute Refactoring
Hurra, ein
compile error
Complex Query Strings
Complex Query Strings II
Complex Query Strings III
JOOQ to the rescue !
https://www.jooq.org/
JAVA OBJECT ORIENTED QUERYING
• query builder framework
• Java DSL
• DB Schema im Zentrum
• Typesafe
• OpenSource / kommerziell
Wie
DB Schema Java Quellen
DB Migration
jooq generator
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
Dynamic Where Clause
noch die Criteria API
aber KEINE
Projections möglich,
nur Entities
<DEMO>
dominik @ todo42.de

Mais conteúdo relacionado

Semelhante a Typesafe SQL in Java

Grails im Überblick und in der Praxis
Grails im Überblick und in der PraxisGrails im Überblick und in der Praxis
Grails im Überblick und in der PraxisTobias Kraft
 
May the forge be with you
May the forge be with youMay the forge be with you
May the forge be with youSandro Sonntag
 
Enterprise Java Batch mit Spring
Enterprise Java Batch mit SpringEnterprise Java Batch mit Spring
Enterprise Java Batch mit Springdenschu
 
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)Ulrike Schwinn
 
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...predic8
 
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!OPEN KNOWLEDGE GmbH
 
MongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBMongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBTobias Trelle
 
Effiziente datenpersistierung mit JPA 2.1 und Hibernate
Effiziente datenpersistierung mit JPA 2.1 und HibernateEffiziente datenpersistierung mit JPA 2.1 und Hibernate
Effiziente datenpersistierung mit JPA 2.1 und HibernateThorben Janssen
 
JSON in der Oracle12c Database
JSON in der Oracle12c DatabaseJSON in der Oracle12c Database
JSON in der Oracle12c DatabaseCarsten Czarski
 
Django - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesDjango - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesMarkus Zapke-Gründemann
 
Icinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga
 
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang Rütter
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang RütterOracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang Rütter
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang RütterOPITZ CONSULTING Deutschland
 
Agile Oracle database modeling and development - APEX Connect 2020
Agile Oracle database modeling and development - APEX Connect 2020Agile Oracle database modeling and development - APEX Connect 2020
Agile Oracle database modeling and development - APEX Connect 2020Torsten Kleiber
 
Einführung in NoSQL-Datenbanken
Einführung in NoSQL-DatenbankenEinführung in NoSQL-Datenbanken
Einführung in NoSQL-DatenbankenTobias Trelle
 
Creasoft-Akademie - Mobile Multiplattform Apps
Creasoft-Akademie - Mobile Multiplattform AppsCreasoft-Akademie - Mobile Multiplattform Apps
Creasoft-Akademie - Mobile Multiplattform AppsCreasoft AG
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsStefan Adolf
 
REST mit APEX 18.1
REST mit APEX 18.1REST mit APEX 18.1
REST mit APEX 18.1Oliver Lemm
 

Semelhante a Typesafe SQL in Java (20)

Grails im Überblick und in der Praxis
Grails im Überblick und in der PraxisGrails im Überblick und in der Praxis
Grails im Überblick und in der Praxis
 
May the forge be with you
May the forge be with youMay the forge be with you
May the forge be with you
 
Die Java Plattform Strategie
Die Java Plattform StrategieDie Java Plattform Strategie
Die Java Plattform Strategie
 
Enterprise Java Batch mit Spring
Enterprise Java Batch mit SpringEnterprise Java Batch mit Spring
Enterprise Java Batch mit Spring
 
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
Überblick: 18c und Autonomous Data Warehouse Cloud (ADWC)
 
Enterprise JS
Enterprise JS Enterprise JS
Enterprise JS
 
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
 
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
 
MongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBMongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDB
 
Effiziente datenpersistierung mit JPA 2.1 und Hibernate
Effiziente datenpersistierung mit JPA 2.1 und HibernateEffiziente datenpersistierung mit JPA 2.1 und Hibernate
Effiziente datenpersistierung mit JPA 2.1 und Hibernate
 
JSON in der Oracle12c Database
JSON in der Oracle12c DatabaseJSON in der Oracle12c Database
JSON in der Oracle12c Database
 
Arquillian
ArquillianArquillian
Arquillian
 
Django - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesDjango - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlines
 
Icinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga 2009 at Nagios Workshop
Icinga 2009 at Nagios Workshop
 
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang Rütter
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang RütterOracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang Rütter
Oracle ETL Herausforderungen - OPITZ CONSULTING - Till Sander - Wolfgang Rütter
 
Agile Oracle database modeling and development - APEX Connect 2020
Agile Oracle database modeling and development - APEX Connect 2020Agile Oracle database modeling and development - APEX Connect 2020
Agile Oracle database modeling and development - APEX Connect 2020
 
Einführung in NoSQL-Datenbanken
Einführung in NoSQL-DatenbankenEinführung in NoSQL-Datenbanken
Einführung in NoSQL-Datenbanken
 
Creasoft-Akademie - Mobile Multiplattform Apps
Creasoft-Akademie - Mobile Multiplattform AppsCreasoft-Akademie - Mobile Multiplattform Apps
Creasoft-Akademie - Mobile Multiplattform Apps
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
 
REST mit APEX 18.1
REST mit APEX 18.1REST mit APEX 18.1
REST mit APEX 18.1
 

Typesafe SQL in Java