tkalkirill commented on code in PR #2860:
URL: https://github.com/apache/ignite-3/pull/2860#discussion_r1403322675


##########
modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java:
##########
@@ -185,6 +185,42 @@ protected static void insertPersons(String tableName, 
Person... people) {
         );
     }
 
+    /**
+     * Updates data in the table created by {@link #createZoneAndTable(String, 
String, int, int)}.
+     *
+     * @param tableName Table name.
+     * @param people People to update in the table.
+     */
+    protected static void updatePersons(String tableName, Person... people) {
+        Transaction tx = CLUSTER.node(0).transactions().begin();
+
+        String sql = String.format("UPDATE %s SET NAME=?, SALARY=? WHERE 
ID=?", tableName);
+
+        for (Person person : people) {
+            sql(tx, sql, person.name, person.salary, person.id);
+        }
+
+        tx.commit();
+    }
+
+    /**
+     * Deletes data in the table created by {@link #createZoneAndTable(String, 
String, int, int)}.
+     *
+     * @param tableName Table name.
+     * @param personIds Person IDs to delete.
+     */
+    protected static void deletePersons(String tableName, int... personIds) {

Review Comment:
   I don’t see the need to do this yet, let them stay here for now, then if the 
situation is too much, we’ll do it better.



##########
modules/runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java:
##########
@@ -185,6 +185,42 @@ protected static void insertPersons(String tableName, 
Person... people) {
         );
     }
 
+    /**
+     * Updates data in the table created by {@link #createZoneAndTable(String, 
String, int, int)}.
+     *
+     * @param tableName Table name.
+     * @param people People to update in the table.
+     */
+    protected static void updatePersons(String tableName, Person... people) {
+        Transaction tx = CLUSTER.node(0).transactions().begin();
+
+        String sql = String.format("UPDATE %s SET NAME=?, SALARY=? WHERE 
ID=?", tableName);
+
+        for (Person person : people) {
+            sql(tx, sql, person.name, person.salary, person.id);
+        }
+
+        tx.commit();
+    }
+
+    /**
+     * Deletes data in the table created by {@link #createZoneAndTable(String, 
String, int, int)}.
+     *
+     * @param tableName Table name.
+     * @param personIds Person IDs to delete.
+     */
+    protected static void deletePersons(String tableName, int... personIds) {

Review Comment:
   I don’t see the need to do this yet, let them stay here for now, then if the 
situation is too much, we’ll do it better.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to