tkalkirill commented on code in PR #2860:
URL: https://github.com/apache/ignite-3/pull/2860#discussion_r1403911589
##########
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:
For now, yes, but I have plans to continue using them, I won’t change them
for now, if necessary, we’ll change them later.
##########
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:
For now, yes, but I have plans to continue using them, I won’t change them
for now, if necessary, we’ll change them later.
--
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]