jOOQ 3.2.2 发布,Java数据库框架
jopen 11年前
jOOQ能够根据您的数据库生成Java代码,并允许您通过它流畅的API构建类型安全的SQL查询。它主要包含以下特性:
1、代码生成:jOOQ能够生成与数据库结构相对应的Java对象,包括表格,视图,存储过程,用户定义的类型等。
2、Active records:jOOQ实现一个易于使用的Active Record模式。它不是一个OR-mapper,但提供了表格/视图与Java对象之间的一对一映射和字段与对象成员之间的映射。
3、Typesafe SQL:jOOQ允许使用内置的DSL来编写编译期类型安全的SQL查询语句。
4、SQL标准:jOOQ支持所有标准SQL语法包括,复杂的UNION,嵌套SELECTs,Joins,别名。
Java数据库框架比较
</tr> </tbody> </table> </div>
备注说明:
- Hibernate evolves around HQL and/or JPQL. While it does not hide SQL entirely, it does not really help writing SQL.
- Spring Data is not focused on SQL, which means that you load lots of non-related dependencies and complexity from other types of data stores.
- You can make stored procedures work with all frameworks. But it is a pain, compared to jOOQ.
- You can make user-defined types work with JDBC. But it is a pain, compared to jOOQ.
- Hibernate inherits JPA's Criteria API, which is a typesafe query DSL, although not for SQL.
- jOOQ has a simple templating engine that can be used with plain SQL.
- jOOQ's and MyBatis' have simple POJO mapping capabilities.
jOOQ | Hibernate | MyBatis | SpringData | JDBC | |
---|---|---|---|---|---|
SQL related | |||||
SQL centric | ![]() | ![]() | ![]() | ||
SQL dialect abstraction | ![]() | ![]() | ![]() | ![]() | ![]() |
SQL dialect emulation | ![]() | ![]() | ![]() | ![]() | ![]() |
Database related | |||||
Stored procedures | ![]() | ||||
User-defined types | ![]() | ![]() | ![]() | ||
Java API related | |||||
Native SQL support | ![]() | ![]() | ![]() | ![]() | ![]() |
Typesafe query DSL | ![]() | ![]() | ![]() | ![]() | |
Metadata code generation | ![]() | ![]() | ![]() | ![]() | ![]() |
Active records | ![]() | ![]() | ![]() | ![]() | ![]() |
Query lifecycle SPI | ![]() | ![]() | ![]() | ![]() | ![]() |
Schema, table multitenancy | ![]() | ![]() | ![]() | ![]() | ![]() |
SQL transformation SPI | ![]() | ![]() | ![]() | ![]() | ![]() |
SQL templating | ![]() | ![]() | ![]() | ![]() | |
POJO mapping | ![]() | ![]() | ![]() | ||
Row mapping | ![]() | ![]() | ![]() | ![]() | ![]() |