diff --git a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-2.4.0.xsd b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-2.4.0.xsd index 7e789250cf..9e220b0513 100644 --- a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-2.4.0.xsd +++ b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-2.4.0.xsd @@ -341,7 +341,9 @@ diff --git a/jOOQ-website/src/main/resources/manual.xml b/jOOQ-website/src/main/resources/manual.xml index ac41a85eea..16ac51b9ab 100644 --- a/jOOQ-website/src/main/resources/manual.xml +++ b/jOOQ-website/src/main/resources/manual.xml @@ -151,6 +151,12 @@ CREATE TABLE t_book_to_book_store (
  • : An optional JDBC Connection that will be re-used for the whole lifecycle of your Factory
  • +
  • : + An optional JDBC DataSource that will be re-used for the whole + lifecycle of your Factory. If you prefer using DataSources over + Connections, jOOQ will internally fetch new Connections from + your DataSource, conveniently closing them again after query execution. + This is particularly useful in J2EE or Spring contexts.
  • : An optional runtime configuration.
  • @@ -899,7 +905,7 @@ d.execute(); The MERGE statement is one of the most advanced standardised SQL constructs, which is supported by DB2, HSQLDB, Oracle, SQL Server and Sybase (MySQL has the similar INSERT .. ON DUPLICATE KEY UPDATE - construct. H2's MERGE variant is currently not supported.) + construct)

    The point of the standard MERGE statement is to take a TARGET table, and @@ -930,6 +936,36 @@ WHEN NOT MATCHED THEN INSERT (LAST_NAME) +

    MERGE Statement (H2-specific syntax)

    +

    + The H2 database ships with a somewhat less powerful + but a little more intuitive syntax for its own version of the MERGE statement. + An example more or less equivalent to the previous one + can be seen here: +

    + +-- Check if there is already an author called 'Hitchcock' +-- If there is, rename him to John. If there isn't add him. + +MERGE INTO T_AUTHOR (FIRST_NAME, LAST_NAME) +KEY (LAST_NAME) +VALUES ('John', 'Hitchcock') +create.mergeInto(T_AUTHOR, + T_AUTHOR.FIRST_NAME, + T_AUTHOR.LAST_NAME) + .key(T_AUTHOR.LAST_NAME) + .values("John", "Hitchcock") + .execute(); + + +

    + This syntax can be fully simulated by jOOQ for all other + databases that support the SQL standard. For more information + about the H2 MERGE syntax, see the documentation here: +
    +
    + http://www.h2database.com/html/grammar.html#merge +

    TRUNCATE Statement

    @@ -1968,10 +2004,16 @@ public class AsInDatabaseStrategy extends DefaultGeneratorStrategy { Defaults to false --> false - false + + false + @@ -3081,7 +3123,9 @@ TableOnConditionStep onKey(ForeignKey key);]]> Condition isNull(); Condition isNotNull(); Condition like(T value); + Condition likeIgnoreCase(T value); Condition notLike(T value); + Condition notLikeIgnoreCase(T value); Condition in(T... values); Condition in(Select query); Condition notIn(Collection values);