diff --git a/jOOQ-codegen-maven-example/pom.xml b/jOOQ-codegen-maven-example/pom.xml index ca3751d506..d9a1bf8d17 100644 --- a/jOOQ-codegen-maven-example/pom.xml +++ b/jOOQ-codegen-maven-example/pom.xml @@ -9,7 +9,7 @@ org.jooq jooq-codegen-maven-example - 2.0.0 + 2.0.0-RC1 jar jOOQ Codegen Maven @@ -51,7 +51,7 @@ org.jooq jooq - 2.0.0 + 2.0.0-RC1 jar compile @@ -99,7 +99,7 @@ org.jooq jooq-codegen-maven - 2.0.0 + 2.0.0-RC1 exec1 diff --git a/jOOQ-codegen-maven/pom.xml b/jOOQ-codegen-maven/pom.xml index abb0610d53..7d732bd892 100644 --- a/jOOQ-codegen-maven/pom.xml +++ b/jOOQ-codegen-maven/pom.xml @@ -9,7 +9,7 @@ org.jooq jooq-codegen-maven - 2.0.0 + 2.0.0-RC1 maven-plugin jOOQ Codegen Maven @@ -160,7 +160,7 @@ org.jooq jooq-codegen - 2.0.0 + 2.0.0-RC1 jar diff --git a/jOOQ-codegen/pom.xml b/jOOQ-codegen/pom.xml index e0e5027cac..a4c11c0fdf 100644 --- a/jOOQ-codegen/pom.xml +++ b/jOOQ-codegen/pom.xml @@ -10,7 +10,7 @@ org.jooq jooq-codegen - 2.0.0 + 2.0.0-RC1 jar jOOQ Codegen @@ -150,14 +150,14 @@ org.jooq jooq - 2.0.0 + 2.0.0-RC1 jar compile org.jooq jooq-meta - 2.0.0 + 2.0.0-RC1 jar compile diff --git a/jOOQ-meta/pom.xml b/jOOQ-meta/pom.xml index 9d2dcb0537..498d5a4eea 100644 --- a/jOOQ-meta/pom.xml +++ b/jOOQ-meta/pom.xml @@ -9,7 +9,7 @@ org.jooq jooq-meta - 2.0.0 + 2.0.0-RC1 jar jOOQ Meta @@ -149,7 +149,7 @@ org.jooq jooq - 2.0.0 + 2.0.0-RC1 jar compile diff --git a/jOOQ-release/build.xml b/jOOQ-release/build.xml index 7a3cd10733..84fe0d5d70 100644 --- a/jOOQ-release/build.xml +++ b/jOOQ-release/build.xml @@ -6,21 +6,25 @@ - + + + + + diff --git a/jOOQ-release/release/template/RELEASENOTES.txt b/jOOQ-release/release/template/RELEASENOTES.txt index ffbe492245..fe7b562a6a 100644 --- a/jOOQ-release/release/template/RELEASENOTES.txt +++ b/jOOQ-release/release/template/RELEASENOTES.txt @@ -9,6 +9,228 @@ http://www.jooq.org/notes.php For a text version, see http://www.jooq.org/inc/RELEASENOTES.txt +Version 2.0.0 - November 25, 2011 +================================================================= +This release is a fresh start in many areas of jOOQ, adressing +issues that have been requested by users for a long time. These +release notes docment the most important changes, a detailed +upgrade guide, as well as the detailed list of improvements. + +Most important changes +---------------------- +- The API became more static. This applies to many Factory + methods, such as val(), literal(), as well as to many Field + methods that have been moved over to the Factory. For example, + when before, you wrote this using "postfix function notation": + +
NAME.replace(" ", "_").trim()
+ + you will now write (just as in SQL): + +
trim(replace(NAME, " ", "_"))
+ + Using static imports of Factory.*, jOOQ makes SQL look even + more like SQL +- By default, jooq-codegen will now generate a "dynamic" meta + model as opposed to the existing static one. Generated tables + covariantly override the as(String) aliasing method, leading + to a much more convenient aliasing style. When before, you + wrote: + +
+Table parent = T.as("parent");
+Table child  = T.as("child");
+Condition join = 
+  parent.getField("ID").equal(child.getField("PARENT_ID"))
+
+ + You can now write: + +
+T parent = T.as("parent");
+T child  = T.as("child");
+Condition join = parent.ID.equal(child.PARENT_ID)
+
+ + Of course, the existing notation still works + +- Exceptions are no longer checked. When previously, the DB's + SQLException was propagated to client code, there is now an + unchecked DataAccessException hierarchy, similar to that of + Spring. This will eventually give way to a standardised error + handling abstraction, in future developments. +- Window functions are now constructed from their underlying + aggregate functions just like in SQL. For example: + +
+sum(AMOUNT)
+sum(AMOUNT).over().partitionBy(ACCOUNT)
+
+ + This makes for a more concise API, especially when considering + future extensions, such as Oracle's KEEP (DENSE_RANK FIRST...) + syntax. +- More type safety has been introduced regarding various places + where generic and types are involved. + This is especially true for INSERT / UPDATE / DELETE statements +- Sequences now also have a type +- Unsigned number types are now supported in those databases that + use them. Unsigned numbers are implemented in jOOU, a spin-off + open source project: + +http://code.google.com/p/joou/ + +Upgrade instructions: +--------------------- +Various of the above changes are incompatible with jOOQ 1.x. In +order to upgrade, please be aware of the following pitfalls: + +- The schema needs to be re-generated. +- Much of the post-fix function notation is replaced by static + methods in the Factory. Today's org.jooq.Field API is not + maintained in jOOQ 2.0 +- Some Factory instance methods (such as val(), literal()) are + now static. They are compatible, but may cause compiler + warnings. +- The meta model is now an instance model by default. If you + prefer the static meta model, you can configure this in your + jooq-codegen configuration. +- The additional typesafety involving and types may cause + compiler warnings and errors. +- SQLException is no longer part of the API. This can cause + compiler issues, in particular when extending jOOQ +- Some utility classes have moved to org.jooq.tools + +Should these incompatibilities be too significant for your +project, you can still stay on the 1.x branch, which will be +maintained for a while. Be aware that upgrading might be more +difficult, later, though. + +Features and improvements +------------------------- +#55 - Implement improved exception handling +#117 - Improve DSL support for field and table aliasing (decrease + verbosity) +#519 - Add support for MySQL UNSIGNED numeric types +#626 - Create static function access +#661 - Add support for bitwise operators +#718 - Sequences should be mapped to appropriate type (e.g. + SMALLINT, INT, BIGINT, etc) +#734 - Add support for Oracle / SQL Server CUBE() and ROLLUP() + grouping functions +#751 - Add support for Oracle / SQL Server GROUPING SETS() + function +#799 - Add support for Oracle PL/SQL's object-oriented MEMBER + PROCEDURES and MEMBER FUNCTIONS +#804 - Add to Insert, Update, Delete +#835 - Review API typesafety for InsertSetMoreStep + set(Field, T) and similar methods +#890 - Add Factory.selectCount() convenience method +#891 - Let min() max(), etc functions return a new type + AggregateFunction. This type can then be used as an entry- + point for window functions +#892 - Add support for Oracle / SQL Server GROUPING() and + GROUPING_ID() functions to be used along with CUBE() and + ROLLUP() +#893 - Simulate ROLLUP() function for MySQL, using the WITH + ROLLUP grouping modifier +#894 - Move functions from Field to org.jooq.impl.Factory + and make them static +#895 - Add power(..., Field) +#897 - Add (experimental) Spring integration project +#898 - Replace usage of checked SQLException by an unchecked + DataAccessException, similar to that of Spring +#899 - Build jOOQ .jar files as bundles to be deployed into OSGI + environments +#900 - Purge deprecated API - Prior to 2.0 +#901 - Introduce InvalidResultException as a subtype of + DataAccessException for integrity checks in methods like + ResultQuery#fetchOne(), ResultQuery#fetchMap(), etc. +#902 - Make AggregateFunction the base type for constructing + window functions +#904 - Move SQLDialectNotSupportedException into + org.jooq.exception package +#905 - Introduce MappingException as a subtype of + DataAccessException for integrity checks in methods like + ResultQuery#fetchInto(), etc. +#907 - Add missing Field.like(Field), notLike(Field) + methods to overload the existing Field.like(T), notLike(T) +#908 - Change rpad / lpad functions to accept String instead of + char +#912 - Add R newRecord(Table, Object) as + the inverse of various into(Class) methods +#916 - Add > {Record.into(Table) | + Result.into(Table) | ResultQuery.fetchInto(Table) | + Cursor.fetchInto(Table)} +#917 - Add various Cursor.fetchOneInto() convenience methods +#918 - Add CustomTable, CustomRecord as base classes for more + convenience when used with various into(Table) methods +#919 - Allow for accessing non-public constructors of Record + subtypes +#923 - Move some utilities to org.jooq.tools +#924 - Generate a reference to every table in a new Tables.java + class for improved static access +#928 - Add DataTypeException extending DataAccessException in + case something went wrong when converting data types +#930 - Support converting date time types to java.util.Calendar. + This applies to various into(Class) methods, as well as + Result.getValue(xx, Class) +#931 - Allow for conversion between Long and date/time types, and + vice versa +#932 - Let the bound of R in TableRecord extend TableRecord, + in UpdatableRecord to extend UpdatableRecord +#933 - Add support for type Character in Record.into(Class) + methods and similar +#936 - Accept primitive types, such as int.class for type + conversion +#938 - CODEGEN: Add static/instance table field configuration +#939 - Include license.txt and readme.txt in .jar files' META-INF + directory +#953 - Make DefaultGeneratorStrategy methods non-final to allow + for overriding +#954 - Add examples for source code generation of multiple + schemata with Maven +#955 - Generate a reference to every type in a new UDTs.java + class +#957 - Add R Factory.newRecord(UDT) for constructing + attached UDTRecords +#958 - CODEGEN: Add generation-time schema mapping, allowing for + re-writing schemata in jooq-codegen +#960 - CODEGEN: Add code generation configuration parameter to + avoid using the new UByte, UShort, UInteger, ULong wrappers + for UNSIGNED number types +#961 - Use Oracle's SYS.ALL_SEQUENCES.MAX_VALUE to determine the + type of a sequence. +#969 - Add List ResultQuery.fetch(Field, + Class) convenience method + +Bug fixes +--------- +#686 - Reduce the internal API leak by preventing access to + TableFieldImpl, UDTFieldImpl, ParameterImpl +#903 - lag(Field, int, T) erroneously delegates to lead() +#906 - Add more NullPointerException safety to API +#913 - NoClassDefFoundError in JooqUtil.isJPAAvailable() +#920 - Generic type is lost in Cursor.fetchInto(RecordHandler) +#925 - SelectConditionStep should extend SelectConnectByStep, not + SelectGroupByStep +#926 - AbstractRecord.into() fails to convert java.sql.Date into + java.util.Date +#934 - Don't consider static members in reflection utilities when + used with Record.into(Class) and similar methods +#935 - Don't consider final member fields in reflection utilities + when used with Record.into(Class) and similar methods +#937 - In the event of name clash (same name for table and field) + generated code has errors +#945 - Calling UpdatableRecord.setValue() twice with the same + argument causes the changed flag to be reset to false +#948 - Always set the changed flag to true in Record.setValue() +#959 - Compilation errors in generated source code if MySQL enum + values match Java reserved words, such as 'true', 'false', + 'new', etc... +#962 - Postgres ordering of generated enum literals is unstable +#967 - Better document type conversion + Version 1.7.0 - November 25, 2011 ================================================================= This is a maintenance release for the 1.x branch. Some important diff --git a/jOOQ-spring/pom.xml b/jOOQ-spring/pom.xml index 0e7704a057..53bfcf3aca 100644 --- a/jOOQ-spring/pom.xml +++ b/jOOQ-spring/pom.xml @@ -10,7 +10,7 @@ org.jooq jooq-spring - 2.0.0 + 2.0.0-RC1 jar jOOQ Spring @@ -188,7 +188,7 @@ org.jooq jooq - 2.0.0 + 2.0.0-RC1 jar compile diff --git a/jOOQ-website/inc/RELEASENOTES.txt b/jOOQ-website/inc/RELEASENOTES.txt index ffbe492245..fe7b562a6a 100644 --- a/jOOQ-website/inc/RELEASENOTES.txt +++ b/jOOQ-website/inc/RELEASENOTES.txt @@ -9,6 +9,228 @@ http://www.jooq.org/notes.php For a text version, see http://www.jooq.org/inc/RELEASENOTES.txt +Version 2.0.0 - November 25, 2011 +================================================================= +This release is a fresh start in many areas of jOOQ, adressing +issues that have been requested by users for a long time. These +release notes docment the most important changes, a detailed +upgrade guide, as well as the detailed list of improvements. + +Most important changes +---------------------- +- The API became more static. This applies to many Factory + methods, such as val(), literal(), as well as to many Field + methods that have been moved over to the Factory. For example, + when before, you wrote this using "postfix function notation": + +
NAME.replace(" ", "_").trim()
+ + you will now write (just as in SQL): + +
trim(replace(NAME, " ", "_"))
+ + Using static imports of Factory.*, jOOQ makes SQL look even + more like SQL +- By default, jooq-codegen will now generate a "dynamic" meta + model as opposed to the existing static one. Generated tables + covariantly override the as(String) aliasing method, leading + to a much more convenient aliasing style. When before, you + wrote: + +
+Table parent = T.as("parent");
+Table child  = T.as("child");
+Condition join = 
+  parent.getField("ID").equal(child.getField("PARENT_ID"))
+
+ + You can now write: + +
+T parent = T.as("parent");
+T child  = T.as("child");
+Condition join = parent.ID.equal(child.PARENT_ID)
+
+ + Of course, the existing notation still works + +- Exceptions are no longer checked. When previously, the DB's + SQLException was propagated to client code, there is now an + unchecked DataAccessException hierarchy, similar to that of + Spring. This will eventually give way to a standardised error + handling abstraction, in future developments. +- Window functions are now constructed from their underlying + aggregate functions just like in SQL. For example: + +
+sum(AMOUNT)
+sum(AMOUNT).over().partitionBy(ACCOUNT)
+
+ + This makes for a more concise API, especially when considering + future extensions, such as Oracle's KEEP (DENSE_RANK FIRST...) + syntax. +- More type safety has been introduced regarding various places + where generic and types are involved. + This is especially true for INSERT / UPDATE / DELETE statements +- Sequences now also have a type +- Unsigned number types are now supported in those databases that + use them. Unsigned numbers are implemented in jOOU, a spin-off + open source project: + +http://code.google.com/p/joou/ + +Upgrade instructions: +--------------------- +Various of the above changes are incompatible with jOOQ 1.x. In +order to upgrade, please be aware of the following pitfalls: + +- The schema needs to be re-generated. +- Much of the post-fix function notation is replaced by static + methods in the Factory. Today's org.jooq.Field API is not + maintained in jOOQ 2.0 +- Some Factory instance methods (such as val(), literal()) are + now static. They are compatible, but may cause compiler + warnings. +- The meta model is now an instance model by default. If you + prefer the static meta model, you can configure this in your + jooq-codegen configuration. +- The additional typesafety involving and types may cause + compiler warnings and errors. +- SQLException is no longer part of the API. This can cause + compiler issues, in particular when extending jOOQ +- Some utility classes have moved to org.jooq.tools + +Should these incompatibilities be too significant for your +project, you can still stay on the 1.x branch, which will be +maintained for a while. Be aware that upgrading might be more +difficult, later, though. + +Features and improvements +------------------------- +#55 - Implement improved exception handling +#117 - Improve DSL support for field and table aliasing (decrease + verbosity) +#519 - Add support for MySQL UNSIGNED numeric types +#626 - Create static function access +#661 - Add support for bitwise operators +#718 - Sequences should be mapped to appropriate type (e.g. + SMALLINT, INT, BIGINT, etc) +#734 - Add support for Oracle / SQL Server CUBE() and ROLLUP() + grouping functions +#751 - Add support for Oracle / SQL Server GROUPING SETS() + function +#799 - Add support for Oracle PL/SQL's object-oriented MEMBER + PROCEDURES and MEMBER FUNCTIONS +#804 - Add to Insert, Update, Delete +#835 - Review API typesafety for InsertSetMoreStep + set(Field, T) and similar methods +#890 - Add Factory.selectCount() convenience method +#891 - Let min() max(), etc functions return a new type + AggregateFunction. This type can then be used as an entry- + point for window functions +#892 - Add support for Oracle / SQL Server GROUPING() and + GROUPING_ID() functions to be used along with CUBE() and + ROLLUP() +#893 - Simulate ROLLUP() function for MySQL, using the WITH + ROLLUP grouping modifier +#894 - Move functions from Field to org.jooq.impl.Factory + and make them static +#895 - Add power(..., Field) +#897 - Add (experimental) Spring integration project +#898 - Replace usage of checked SQLException by an unchecked + DataAccessException, similar to that of Spring +#899 - Build jOOQ .jar files as bundles to be deployed into OSGI + environments +#900 - Purge deprecated API - Prior to 2.0 +#901 - Introduce InvalidResultException as a subtype of + DataAccessException for integrity checks in methods like + ResultQuery#fetchOne(), ResultQuery#fetchMap(), etc. +#902 - Make AggregateFunction the base type for constructing + window functions +#904 - Move SQLDialectNotSupportedException into + org.jooq.exception package +#905 - Introduce MappingException as a subtype of + DataAccessException for integrity checks in methods like + ResultQuery#fetchInto(), etc. +#907 - Add missing Field.like(Field), notLike(Field) + methods to overload the existing Field.like(T), notLike(T) +#908 - Change rpad / lpad functions to accept String instead of + char +#912 - Add R newRecord(Table, Object) as + the inverse of various into(Class) methods +#916 - Add > {Record.into(Table) | + Result.into(Table) | ResultQuery.fetchInto(Table) | + Cursor.fetchInto(Table)} +#917 - Add various Cursor.fetchOneInto() convenience methods +#918 - Add CustomTable, CustomRecord as base classes for more + convenience when used with various into(Table) methods +#919 - Allow for accessing non-public constructors of Record + subtypes +#923 - Move some utilities to org.jooq.tools +#924 - Generate a reference to every table in a new Tables.java + class for improved static access +#928 - Add DataTypeException extending DataAccessException in + case something went wrong when converting data types +#930 - Support converting date time types to java.util.Calendar. + This applies to various into(Class) methods, as well as + Result.getValue(xx, Class) +#931 - Allow for conversion between Long and date/time types, and + vice versa +#932 - Let the bound of R in TableRecord extend TableRecord, + in UpdatableRecord to extend UpdatableRecord +#933 - Add support for type Character in Record.into(Class) + methods and similar +#936 - Accept primitive types, such as int.class for type + conversion +#938 - CODEGEN: Add static/instance table field configuration +#939 - Include license.txt and readme.txt in .jar files' META-INF + directory +#953 - Make DefaultGeneratorStrategy methods non-final to allow + for overriding +#954 - Add examples for source code generation of multiple + schemata with Maven +#955 - Generate a reference to every type in a new UDTs.java + class +#957 - Add R Factory.newRecord(UDT) for constructing + attached UDTRecords +#958 - CODEGEN: Add generation-time schema mapping, allowing for + re-writing schemata in jooq-codegen +#960 - CODEGEN: Add code generation configuration parameter to + avoid using the new UByte, UShort, UInteger, ULong wrappers + for UNSIGNED number types +#961 - Use Oracle's SYS.ALL_SEQUENCES.MAX_VALUE to determine the + type of a sequence. +#969 - Add List ResultQuery.fetch(Field, + Class) convenience method + +Bug fixes +--------- +#686 - Reduce the internal API leak by preventing access to + TableFieldImpl, UDTFieldImpl, ParameterImpl +#903 - lag(Field, int, T) erroneously delegates to lead() +#906 - Add more NullPointerException safety to API +#913 - NoClassDefFoundError in JooqUtil.isJPAAvailable() +#920 - Generic type is lost in Cursor.fetchInto(RecordHandler) +#925 - SelectConditionStep should extend SelectConnectByStep, not + SelectGroupByStep +#926 - AbstractRecord.into() fails to convert java.sql.Date into + java.util.Date +#934 - Don't consider static members in reflection utilities when + used with Record.into(Class) and similar methods +#935 - Don't consider final member fields in reflection utilities + when used with Record.into(Class) and similar methods +#937 - In the event of name clash (same name for table and field) + generated code has errors +#945 - Calling UpdatableRecord.setValue() twice with the same + argument causes the changed flag to be reset to false +#948 - Always set the changed flag to true in Record.setValue() +#959 - Compilation errors in generated source code if MySQL enum + values match Java reserved words, such as 'true', 'false', + 'new', etc... +#962 - Postgres ordering of generated enum literals is unstable +#967 - Better document type conversion + Version 1.7.0 - November 25, 2011 ================================================================= This is a maintenance release for the 1.x branch. Some important diff --git a/jOOQ-website/notes.php b/jOOQ-website/notes.php index 05231b2a91..5a72a814b2 100644 --- a/jOOQ-website/notes.php +++ b/jOOQ-website/notes.php @@ -88,6 +88,8 @@ function printContent() { function markup($value) { $value = htmlentities($value); + $value = preg_replace('%<pre>%', '
', $value);
+	$value = preg_replace('%</pre>%', '
', $value); $value = preg_replace('%(https?://\S+)%', '$1', $value); return $value; } diff --git a/jOOQ/pom.xml b/jOOQ/pom.xml index 186d7d53b8..50a7d97976 100644 --- a/jOOQ/pom.xml +++ b/jOOQ/pom.xml @@ -10,7 +10,7 @@ org.jooq jooq - 2.0.0 + 2.0.0-RC1 jar jOOQ