diff --git a/jOOQ/src/main/java/org/jooq/ExecuteListener.java b/jOOQ/src/main/java/org/jooq/ExecuteListener.java index 8bc7f5dea8..70211cb2d8 100644 --- a/jOOQ/src/main/java/org/jooq/ExecuteListener.java +++ b/jOOQ/src/main/java/org/jooq/ExecuteListener.java @@ -240,7 +240,9 @@ import org.jooq.tools.StopWatchListener; * * *
- *

Legend:

+ *

+ *

Legend:
+ *

*

    *
  1. Used with {@link ResultQuery} of statement type * {@link StatementType#PREPARED_STATEMENT}
  2. diff --git a/jOOQ/src/main/java/org/jooq/Record.java b/jOOQ/src/main/java/org/jooq/Record.java index cd8fae42b4..172774e136 100644 --- a/jOOQ/src/main/java/org/jooq/Record.java +++ b/jOOQ/src/main/java/org/jooq/Record.java @@ -65,14 +65,14 @@ import org.jooq.tools.reflect.Reflect; * implementations often specialise the above description in any of the * following ways: *

    - *

    Table records

    + *
    Table records
    *

    * Records originating from a concrete database table (or view) are modelled by * jOOQ as {@link TableRecord} or {@link UpdatableRecord}, if they contain a * primary key. If you're using jOOQ's code generator, you can generate even * more concrete types of table records, i.e. one table record per table. *

    - *

    UDT records

    + *
    UDT records
    *

    * {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} formally support * user defined types (UDT), which are modelled by jOOQ as {@link UDTRecord}. In @@ -80,7 +80,7 @@ import org.jooq.tools.reflect.Reflect; * implement the JDBC {@link SQLData} API in order to be streamed to a JDBC * {@link PreparedStatement} or from a JDBC {@link ResultSet} *

    - *

    Records of well-defined degree

    + *
    Records of well-defined degree
    *

    * When projecting custom record types in SQL, new ad-hoc types of a certain * degree are formed on the fly. Records with degree <= 22 are reflected by @@ -91,7 +91,7 @@ import org.jooq.tools.reflect.Reflect; * Note that generated TableRecords and UDTRecords * also implement a Record[N] interface, if N <= 22 *

    - *

    Record implements Comparable

    + *
    Record implements Comparable
    *

    * jOOQ records have a natural ordering implemented in the same way as this is * defined in the SQL standard. For more details, see the @@ -634,15 +634,18 @@ public interface Record extends Attachable, Comparable { * Map resulting records onto a custom type. *

    * The mapping algorithm is this: - *

    If type is an array:

    The resulting array is of the - * nature described in {@link #intoArray()}. Arrays more specific than - * Object[] can be specified as well, e.g. - * String[]. If conversion fails, a {@link MappingException} is - * thrown, wrapping conversion exceptions. *

    - *

    If a default constructor is available and any JPA {@link Column} + *

    If type is an array:
    + *

    + * The resulting array is of the nature described in {@link #intoArray()}. + * Arrays more specific than Object[] can be specified as well, + * e.g. String[]. If conversion fails, a + * {@link MappingException} is thrown, wrapping conversion exceptions. + *

    + *

    If a default constructor is available and any JPA {@link Column} * annotations are found on the provided type, only those are - * used:
    + * used: + *

    *

    - *

    If a default constructor is available and if there are no JPA + *

    + *

    If a default constructor is available and if there are no JPA * Column annotations, or jOOQ can't find the * javax.persistence API on the classpath, jOOQ will map - * Record values by naming convention:
    If - * {@link Field#getName()} is MY_field (case-sensitive!), then - * this field's value will be set on all of these: + * Record values by naming convention: + *

    + * If {@link Field#getName()} is MY_field (case-sensitive!), + * then this field's value will be set on all of these: *

    - *

    If no default constructor is available, but at least one constructor + *

    + *

    If no default constructor is available, but at least one constructor * annotated with ConstructorProperties is available, that one - * is used
    + * is used + *

    *

    - *

    If no default constructor is available, but at least one "matching" - * constructor is available, that one is used

    + *

    + *

    If no default constructor is available, but at least one "matching" + * constructor is available, that one is used
    + *

    *

    - *

    If the supplied type is an interface or an abstract class

    + *

    + *

    If the supplied type is an interface or an abstract class
    + *

    * Abstract types are instanciated using Java reflection {@link Proxy} * mechanisms. The returned proxy will wrap a {@link HashMap} containing * properties mapped by getters and setters of the supplied type. Methods * (even JPA-annotated ones) other than standard POJO getters and setters * are not supported. Details can be seen in {@link Reflect#as(Class)}. - *

    Other restrictions

    + *

    + *

    Other restrictions
    + *

    *

    + *

    Other restrictions

    *

    + *

    If there are no JPA Column annotations, or jOOQ can't * find the javax.persistence API on the classpath, jOOQ will - * map members by naming convention:
    If {@link Field#getName()} is + * map members by naming convention:

    If {@link Field#getName()} is * MY_field (case-sensitive!), then this field's value will be * fetched from the first of these: *

    - *

    Other restrictions

    + *

    + *

    Other restrictions

    *

    - *

    General notes

    The resulting record will have its internal + *

    + *

    General notes

    The resulting record will have its internal * "changed" flags set to true for all values. This means that * {@link UpdatableRecord#store()} will perform an INSERT * statement. If you wish to store the record using an UPDATE @@ -958,13 +971,13 @@ public interface Record extends Attachable, Comparable { * jOOQ Records implement {@link Comparable} to allow for naturally ordering * Records in a "SQL way", i.e. according to the following rules: *

    - *

    Records being compared must have the same ROW type

    + *
    Records being compared must have the same ROW type
    *

    * Two Records are comparable if and only if they have the same - * ROW type, i.e. if their {@link Record#fieldsRow() fieldsRow()} - * methods return fields of the same type and degree. + * ROW type, i.e. if their {@link Record#fieldsRow() + * fieldsRow()} methods return fields of the same type and degree. *

    - *

    Comparison rules

    + *
    Comparison rules
    *

    * Assume the following notations: *

    *

    * Note: This simulation may not be efficient for large result sets! - *

    Not supported

    These dialects are known not to support the - * FOR UPDATE clause in regular SQL: + *

    + *

    Not supported
    + *

    + * These dialects are known not to support the FOR UPDATE + * clause in regular SQL: *

    diff --git a/jOOQ/src/main/java/org/jooq/Table.java b/jOOQ/src/main/java/org/jooq/Table.java index e794f25716..d30faee90f 100644 --- a/jOOQ/src/main/java/org/jooq/Table.java +++ b/jOOQ/src/main/java/org/jooq/Table.java @@ -99,12 +99,13 @@ public interface Table extends TableLike { * on {@link Settings#getRenderNameStyle()}. By default, table aliases are * quoted, and thus case-sensitive! *

    - *

    Derived column lists for table references

    Note, not all - * databases support derived column lists for their table aliases. On the - * other hand, some databases do support derived column lists, but only for - * derived tables. jOOQ will try to turn table references into derived - * tables to make this syntax work. In other words, the following statements - * are equivalent:
    +     * 
    Derived column lists for table references
    + *

    + * Note, not all databases support derived column lists for their table + * aliases. On the other hand, some databases do support derived column + * lists, but only for derived tables. jOOQ will try to turn table + * references into derived tables to make this syntax work. In other words, + * the following statements are equivalent:

          * -- Using derived column lists to rename columns (e.g. Postgres)
          * SELECT t.a, t.b
          * FROM my_table t(a, b)
    @@ -116,9 +117,11 @@ public interface Table extends TableLike {
          * ) t(a, b)
          * 
    *

    - *

    Derived column lists for derived tables

    Other databases may not - * support derived column lists at all, but they do support common table - * expressions. The following statements are equivalent:
    +     * 
    Derived column lists for derived tables
    + *

    + * Other databases may not support derived column lists at all, but they do + * support common table expressions. The following statements are + * equivalent:

          * -- Using derived column lists to rename columns (e.g. Postgres)
          * SELECT t.a, t.b
          * FROM (
    diff --git a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
    index f9d32b1238..43e3fbb521 100644
    --- a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
    +++ b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
    @@ -104,7 +104,7 @@ public interface UpdatableRecord> extends TableReco
          * Depending on the state of the primary key's or main unique key's value,
          * an {@link #insert()} or an {@link #update()} statement is executed.
          * 

    - *

    Statement type

    + *
    Statement type
    *

    *

      *
    • If this record was created by client code, an INSERT @@ -124,7 +124,8 @@ public interface UpdatableRecord> extends TableReco * DEFAULT values to be applied by the underlying RDBMS. If no * fields were modified, neither an UPDATE nor an * INSERT will be executed. - *

      Automatic value generation

      + *

      + *

      Automatic value generation
      *

      * Use {@link #insert()} or {@link #update()} to explicitly force either * statement type. @@ -156,7 +157,8 @@ public interface UpdatableRecord> extends TableReco * manually using the various {@link Executor#insertInto(Table)}, * {@link Executor#update(Table)} methods.

    • *
    - *

    Optimistic locking

    + *

    + *

    Optimistic locking
    *

    * If an UPDATE statement is executed and * {@link Settings#isExecuteWithOptimisticLocking()} is set to @@ -191,7 +193,8 @@ public interface UpdatableRecord> extends TableReco *

    * See {@link SelectQuery#setForUpdate(boolean)} for more details * - *

    Statement examples

    + *

    + *

    Statement examples
    *

    * Possible statements are *

      @@ -251,7 +254,7 @@ public interface UpdatableRecord> extends TableReco * Deletes this record from the database, based on the value of the primary * key or main unique key. *

      - *

      Optimistic locking

      + *
      Optimistic locking
      *

      * If a DELETE statement is executed and * {@link Settings#isExecuteWithOptimisticLocking()} is set to @@ -286,7 +289,7 @@ public interface UpdatableRecord> extends TableReco *

      * See {@link SelectQuery#setForUpdate(boolean)} for more details *

    - *

    Statement examples

    + *
    Statement examples
    *

    * The executed statement is

          * DELETE FROM [table]
    diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
    index 58e5ad2f43..1899516424 100644
    --- a/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
    +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
    @@ -100,7 +100,7 @@ class DefaultExecuteContext extends AbstractConfiguration implements ExecuteCont
         /**
          * Clean up blobs, clobs and the local configuration.
          * 

    - *

    BLOBS and CLOBS

    + *
    BLOBS and CLOBS
    *

    * [#1326] This is necessary in those dialects that have long-lived * temporary lob objects, which can cause memory leaks in certain contexts, @@ -114,7 +114,7 @@ class DefaultExecuteContext extends AbstractConfiguration implements ExecuteCont * {@link OutOfMemoryError} *

*

- *

Local configuration

+ *
Local configuration
*

* [#1544] There exist some corner-cases regarding the {@link SQLOutput} * API, used for UDT serialisation / deserialisation, which have no elegant diff --git a/jOOQ/src/main/java/org/jooq/impl/Executor.java b/jOOQ/src/main/java/org/jooq/impl/Executor.java index 82053e209a..9f102ca2ce 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Executor.java +++ b/jOOQ/src/main/java/org/jooq/impl/Executor.java @@ -4742,11 +4742,14 @@ public class Executor implements Configuration { * batch mode (with bind values). *

* This batch operation can be executed in two modes: - *

With + *

+ *

With * {@link Settings#getStatementType()} == {@link StatementType#PREPARED_STATEMENT} - * (the default)
In this mode, record order is preserved as much as - * possible, as long as two subsequent records generate the same SQL (with - * bind variables). The number of executed batch operations corresponds to + * (the default) + *

+ * In this mode, record order is preserved as much as possible, as long as + * two subsequent records generate the same SQL (with bind variables). The + * number of executed batch operations corresponds to * [number of distinct rendered SQL statements]. In the worst * case, this corresponds to the number of total records. *

@@ -4764,12 +4767,14 @@ public class Executor implements Configuration { *

  • INSERT b1, b3
  • *
  • INSERT c1
  • * - *

    With + *

    + *

    With * {@link Settings#getStatementType()} == {@link StatementType#STATIC_STATEMENT} - *
    This mode may be better for large and complex batch store - * operations, as the order of records is preserved entirely, and jOOQ can - * guarantee that only a single batch statement is serialised to the - * database. + * + *

    + * This mode may be better for large and complex batch store operations, as + * the order of records is preserved entirely, and jOOQ can guarantee that + * only a single batch statement is serialised to the database. * * @see Statement#executeBatch() */ @@ -4837,16 +4842,20 @@ public class Executor implements Configuration { public final Batch batchUpdate(Collection> records) { return batchUpdate(records.toArray(new UpdatableRecord[records.size()])); } + /** * Execute a set of DELETE queries in batch mode (with bind * values). *

    * This batch operation can be executed in two modes: - *

    With + *

    + *

    With * {@link Settings#getStatementType()} == {@link StatementType#PREPARED_STATEMENT} - * (the default)
    In this mode, record order is preserved as much as - * possible, as long as two subsequent records generate the same SQL (with - * bind variables). The number of executed batch operations corresponds to + * (the default) + *

    + * In this mode, record order is preserved as much as possible, as long as + * two subsequent records generate the same SQL (with bind variables). The + * number of executed batch operations corresponds to * [number of distinct rendered SQL statements]. In the worst * case, this corresponds to the number of total records. *

    @@ -4864,12 +4873,14 @@ public class Executor implements Configuration { *

  • DELETE c1, c2
  • *
  • DELETE a5
  • * - *

    With + *

    + *

    With * {@link Settings#getStatementType()} == {@link StatementType#STATIC_STATEMENT} - *
    This mode may be better for large and complex batch delete - * operations, as the order of records is preserved entirely, and jOOQ can - * guarantee that only a single batch statement is serialised to the - * database. + * + *

    + * This mode may be better for large and complex batch delete operations, as + * the order of records is preserved entirely, and jOOQ can guarantee that + * only a single batch statement is serialised to the database. * * @see Statement#executeBatch() */ diff --git a/jOOQ/src/main/java/org/jooq/impl/Factory.java b/jOOQ/src/main/java/org/jooq/impl/Factory.java index 9be9091f50..80b8efb84d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Factory.java +++ b/jOOQ/src/main/java/org/jooq/impl/Factory.java @@ -160,9 +160,11 @@ import org.jooq.types.DayToSecond; * Condition condition = Factory.exists(Factory.select(...)); * *

    - *

    Factory and static imports

    For increased fluency and readability of - * your jOOQ client code, it is recommended that you static import all methods - * from the Factory. For example:
    + * 
    Factory and static imports
    + *

    + * For increased fluency and readability of your jOOQ client code, it is + * recommended that you static import all methods from the Factory. + * For example:

      * import static org.jooq.impl.Factory.*;
      *
      * public class Main {