From 652d2e07df7f4e5f56cb776b6d574c152bc43aa6 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Mon, 26 May 2014 16:10:36 +0200 Subject: [PATCH] [#3267] Misleading DSLContext.batch() Javadoc. It should be clear that an additional call to execute() is needed. --- jOOQ/src/main/java/org/jooq/DSLContext.java | 52 ++++++++++++--------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index 6f3d757e6f..939e373647 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -4507,7 +4507,8 @@ public interface DSLContext { // ------------------------------------------------------------------------- /** - * Execute a set of queries in batch mode (without bind values). + * Create a batch statement to execute a set of queries in batch mode + * (without bind values). *

* This essentially runs the following logic:

      * Statement s = connection.createStatement();
@@ -4525,7 +4526,8 @@ public interface DSLContext {
     Batch batch(Query... queries);
 
     /**
-     * Execute a set of queries in batch mode (without bind values).
+     * Create a batch statement to execute a set of queries in batch mode
+     * (without bind values).
      * 

* This is a convenience method for calling *

batch(query(queries[0]), query(queries[1]), ...)
. @@ -4538,7 +4540,8 @@ public interface DSLContext { Batch batch(String... queries); /** - * Execute a set of queries in batch mode (without bind values). + * Create a batch statement to execute a set of queries in batch mode + * (without bind values). *

* This essentially runs the following logic:

      * Statement s = connection.createStatement();
@@ -4556,7 +4559,8 @@ public interface DSLContext {
     Batch batch(Collection queries);
 
     /**
-     * Execute a set of queries in batch mode (with bind values).
+     * Create a batch statement to execute a set of queries in batch mode (with
+     * bind values).
      * 

* When running

      * create.batch(query)
@@ -4589,7 +4593,8 @@ public interface DSLContext {
     BatchBindStep batch(Query query);
 
     /**
-     * Execute a set of queries in batch mode (with bind values).
+     * Create a batch statement to execute a set of queries in batch mode (with
+     * bind values).
      * 

* This is a convenience method for calling *

batch(query(sql))
. @@ -4602,7 +4607,8 @@ public interface DSLContext { BatchBindStep batch(String sql); /** - * Execute a set of queries in batch mode (with bind values). + * Create a batch statement to execute a set of queries in batch mode (with + * bind values). *

* This is a convenience method for calling {@link #batch(Query)} and then * binding values one by one using {@link BatchBindStep#bind(Object...)} @@ -4618,7 +4624,8 @@ public interface DSLContext { Batch batch(Query query, Object[]... bindings); /** - * Execute a set of queries in batch mode (with bind values). + * Create a batch statement to execute a set of queries in batch mode (with + * bind values). *

* This is a convenience method for calling *

batch(query(sql), bindings)
. @@ -4631,8 +4638,8 @@ public interface DSLContext { Batch batch(String sql, Object[]... bindings); /** - * Execute a set of INSERT and UPDATE queries in - * batch mode (with bind values). + * Create a batch statement to execute a set of INSERT and + * UPDATE queries in batch mode (with bind values). *

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

@@ -4675,8 +4682,8 @@ public interface DSLContext { Batch batchStore(UpdatableRecord... records); /** - * Execute a set of INSERT and UPDATE queries in - * batch mode (with bind values). + * Create a batch statement to execute a set of INSERT and + * UPDATE queries in batch mode (with bind values). * * @see #batchStore(UpdatableRecord...) * @see Statement#executeBatch() @@ -4685,8 +4692,8 @@ public interface DSLContext { Batch batchStore(Collection> records); /** - * Execute a set of INSERT queries in batch mode (with bind - * values). + * Create a batch statement to execute a set of INSERT queries + * in batch mode (with bind values). * * @see #batchStore(UpdatableRecord...) * @see Statement#executeBatch() @@ -4695,8 +4702,8 @@ public interface DSLContext { Batch batchInsert(TableRecord... records); /** - * Execute a set of INSERT queries in batch mode (with bind - * values). + * Create a batch statement to execute a set of INSERT queries + * in batch mode (with bind values). * * @see #batchStore(UpdatableRecord...) * @see Statement#executeBatch() @@ -4705,8 +4712,8 @@ public interface DSLContext { Batch batchInsert(Collection> records); /** - * Execute a set of UPDATE queries in batch mode (with bind - * values). + * Create a batch statement to execute a set of UPDATE queries + * in batch mode (with bind values). * * @see #batchStore(UpdatableRecord...) * @see Statement#executeBatch() @@ -4715,8 +4722,8 @@ public interface DSLContext { Batch batchUpdate(UpdatableRecord... records); /** - * Execute a set of UPDATE queries in batch mode (with bind - * values). + * Create a batch statement to execute a set of UPDATE queries + * in batch mode (with bind values). * * @see #batchStore(UpdatableRecord...) * @see Statement#executeBatch() @@ -4725,8 +4732,8 @@ public interface DSLContext { Batch batchUpdate(Collection> records); /** - * Execute a set of DELETE queries in batch mode (with bind - * values). + * Create a batch statement to execute a set of DELETE queries + * in batch mode (with bind values). *

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

@@ -4769,7 +4776,8 @@ public interface DSLContext { Batch batchDelete(UpdatableRecord... records); /** - * Execute a set of DELETE in batch mode (with bind values). + * Create a batch statement to execute a set of DELETE in batch + * mode (with bind values). * * @see #batchDelete(UpdatableRecord...) * @see Statement#executeBatch()