一个分享个人学习、开发经验的Blog,http://www.joyphper.net

jOOQ 3.2.0 发布,Java 的 ORM 框架

posted @ 2013-10-11 08:41 | 阅读:2512 | 评论:0 | 分类: 新闻 , Java , 软件

jOOQ 3.2.0 发布了,该版本主要是将许可证改为 Apache 2.0 许可和商业订阅双许可。此外还包含大量的改进:

#674 Add <fluentSetters/> code generation flag to let generated setters return this
#996 Add support for various Postgres ARRAY operations
#1079 Add support for Oracle's FLASHBACK QUERY clause
#1171 Add a MatcherStrategy GeneratorStrategy to allow for configurative regex pattern matching and replacement
#1644 Add DSL.dual() to explicitly create a DUAL table that works with any dialect
#1903 Duplicate Query construction API between DSLContext and DSL
#2010 Add listener API to Record / UpdatableRecord
#2352 Enhance <ForcedType/> to allow for forcing a type upon all columns / parameters / attributes of a given data type
#2542 Add a Keyword type and DSL.keyword(String) to construct it
#2593 Add Meta.getPrimaryKeys()
#2594 Add primary key and foreign key navigation support in JDBCDatabase
#2595 Add implicit conversions from Scala functions to RecordMapper
#2603 Add <includeExcludeColumns/> flag to code generation configuration to indicate that <includes/> and <excludes/> shall also match column names
#2606 Distinguish ORACLE10G, ORACLE11G, ORACLE12C SQLDialects within the ORACLE family
#2618 Document the fact that different packages are generated for different schemas
#2619 Add an example ExecuteListener to the manual, showing how UPDATE and DELETE statements without WHERE clause can be aborted
#2630 Add DSL.queryPart(String, Object...) and similar methods to create simple plain SQL query parts
#2652 Change tutorial to use the common AUTHOR table, instead of POSTS
#2660 Add some documentation about jOOQ not supporting operator precedence
#2665 Implement SPI for RenderContext listening to allow for custom SQL transformation
#2666 Pull up RenderContext.sql(QueryPart) and BindContext.bind(QueryPart) to Context.visit(QueryPart)
#2667 Add org.jooq.Clause and let org.jooq.Context listen on start(Clause) and end(Clause) events
#2676 Add QueryPartInternal.clause() to allow for QueryParts to return Clause information to org.jooq.Context
#2689 Expose a DAO's internal RecordMapper through DAO.mapper()
#2696 Provide default implementation for CustomQueryPart.bind() (for all Custom QueryParts)
#2699 Generate DEFAULT and NULL metadata information on generated DataTypes
#2701 Document the fact that jOOQ sets changed flags to true, even if Record.setValue() sets the value already present in the record
#2702 Add DataType.defaulted() and DataType.nullable()
#2706 Generate "full" constructors in records, allowing to construct a record with all values set
#2713 Add support for custom code sections in generated code
#2722 Add DSLContext.newRecord(Field<?>...) to support the creation of custom record types
#2723 Add example VisitListener implementation that prevents UPDATE, DELETE statement execution without explicit WHERE clause
#2724 The default logger should log the number of affected records, if applicable
#2725 Add ExecuteContext.rows() to indicate the number of affected rows in the last executed statement
#2726 Add Attachable.detach()
#2729 Emulate IS DISTINCT FROM through IS / IS NOT in SQLite
#2733 Add the default log4j.xml configuration file to the maven plugin
#2745 Generate default constructor and "assignment-constructor" in POJOs
#2757 Add support for DB2 10.5


jOOQ 高效的合并了复杂SQL、类型安全、源码生成、Active Records、存储过程以及高级数据类型的 Java 类库。
示例代码:
// Create a new record and insert it into the database
TBookRecord book = create.newRecord(T_BOOK);
book.setTitle("My first book");
book.store();

// Update it with new values
book.setPublishedIn(2010);
book.store();

// Delete it
book.delete();

TAG: jooq

共有0条评论 发表评论>>

点击换一张验证码