diff --git a/src/main/java/org/mybatis/dynamic/sql/ParameterTypeConverter.java b/src/main/java/org/mybatis/dynamic/sql/ParameterTypeConverter.java
index 3868f4d4b..7df7572b1 100644
--- a/src/main/java/org/mybatis/dynamic/sql/ParameterTypeConverter.java
+++ b/src/main/java/org/mybatis/dynamic/sql/ParameterTypeConverter.java
@@ -32,7 +32,7 @@
* Existing converters may be reused if they are marked with this additional interface.
*
*
The converter is only used for parameters in a parameter map. It is not used for result set processing.
- * It is also not used for insert statements that are based on an external record class. The converter will be called
+ * It is also not used for insert statements that are based on an external row class. The converter will be called
* in the following circumstances:
*
*
diff --git a/src/main/java/org/mybatis/dynamic/sql/render/RenderingStrategy.java b/src/main/java/org/mybatis/dynamic/sql/render/RenderingStrategy.java
index 7472654f2..70b369c73 100644
--- a/src/main/java/org/mybatis/dynamic/sql/render/RenderingStrategy.java
+++ b/src/main/java/org/mybatis/dynamic/sql/render/RenderingStrategy.java
@@ -79,7 +79,7 @@ public String formatParameterMapKey(AtomicInteger sequence) {
public abstract String getFormattedJdbcPlaceholder(String prefix, String parameterName);
/**
- * This method generates a binding for a parameter to a placeholder in a record based insert statement.
+ * This method generates a binding for a parameter to a placeholder in a row based insert statement.
*
* This binding is specifically for use with insert, batch insert, and multirow insert statements.
* These statements bind parameters to properties of a row class. The Spring implementation changes the binding
@@ -102,7 +102,7 @@ public String getRecordBasedInsertBinding(BindableColumn> column, String prefi
}
/**
- * This method generates a binding for a parameter to a placeholder in a record based insert statement.
+ * This method generates a binding for a parameter to a placeholder in a row based insert statement.
*
*
This binding is specifically for use with insert, batch insert, and multirow insert statements and the
* MapToRow mapping. These statements bind parameters to the row class directly.
diff --git a/src/main/java/org/mybatis/dynamic/sql/update/UpdateDSLCompleter.java b/src/main/java/org/mybatis/dynamic/sql/update/UpdateDSLCompleter.java
index 48ea503a7..70abc3a5e 100644
--- a/src/main/java/org/mybatis/dynamic/sql/update/UpdateDSLCompleter.java
+++ b/src/main/java/org/mybatis/dynamic/sql/update/UpdateDSLCompleter.java
@@ -59,7 +59,7 @@
*
*
*
You could also implement a helper method that would set fields based on values of a record. For example,
- * the following method would set all fields of a record based on whether or not the values are null:
+ * the following method would set all fields of a row based on whether the values are null:
*
*
* static UpdateDSL<UpdateModel> updateSelectiveColumns(PersonRecord record,
diff --git a/src/main/java/org/mybatis/dynamic/sql/util/mybatis3/CommonInsertMapper.java b/src/main/java/org/mybatis/dynamic/sql/util/mybatis3/CommonInsertMapper.java
index 63a9b8234..0a834f604 100644
--- a/src/main/java/org/mybatis/dynamic/sql/util/mybatis3/CommonInsertMapper.java
+++ b/src/main/java/org/mybatis/dynamic/sql/util/mybatis3/CommonInsertMapper.java
@@ -29,7 +29,7 @@
* insert statements that do NOT expect generated keys.
*
* @param
- * the type of record associated with this mapper
+ * the type of row associated with this mapper
*/
public interface CommonInsertMapper extends CommonGeneralInsertMapper {
/**
diff --git a/src/site/markdown/docs/conditions.md b/src/site/markdown/docs/conditions.md
index b7fde71bf..d5683f206 100644
--- a/src/site/markdown/docs/conditions.md
+++ b/src/site/markdown/docs/conditions.md
@@ -203,7 +203,7 @@ case String values to enable case-insensitive queries. There are extension point
mapping if you so desire.
Starting with version 1.5.2, we made a change to the rendering rules for the "in" conditions. This was done to limit the
-danger of conditions failing to render and thus affecting more rows than expected. For the base conditions ("isIn",
+danger of conditions failing to render and thus affecting more rows than expected. For the base conditions ("isIn",
"isNotIn", etc.), if the list of values is empty, then the condition will still render, but the resulting SQL will
be invalid and will cause a runtime exception. We believe this is the safest outcome. For example, suppose
a DELETE statement was coded as follows:
@@ -220,7 +220,7 @@ This statement will be rendered as follows:
delete from foo where status = ? and id in ()
```
-This will cause a runtime error due to invalid SQL, but it eliminates the possibility of deleting ALLs rows with
+This will cause a runtime error due to invalid SQL, but it eliminates the possibility of deleting ALL rows with
active status. If you want to allow the "in" condition to drop from the SQL if the list is empty, then use the
"inWhenPresent" condition.
diff --git a/src/test/java/config/TestContainersConfiguration.java b/src/test/java/config/TestContainersConfiguration.java
index 28c553328..ed2c95c96 100644
--- a/src/test/java/config/TestContainersConfiguration.java
+++ b/src/test/java/config/TestContainersConfiguration.java
@@ -21,6 +21,6 @@
* Utility interface to hold Docker image tags for the test containers we use
*/
public interface TestContainersConfiguration {
- DockerImageName POSTGRES_LATEST = DockerImageName.parse("postgres:15.4");
- DockerImageName MARIADB_LATEST = DockerImageName.parse("mariadb:11.0.3");
+ DockerImageName POSTGRES_LATEST = DockerImageName.parse("postgres:16.3");
+ DockerImageName MARIADB_LATEST = DockerImageName.parse("mariadb:11.4.2");
}
diff --git a/src/test/java/examples/animal/data/AnimalDataTest.java b/src/test/java/examples/animal/data/AnimalDataTest.java
index a051434dc..d751decab 100644
--- a/src/test/java/examples/animal/data/AnimalDataTest.java
+++ b/src/test/java/examples/animal/data/AnimalDataTest.java
@@ -16,9 +16,12 @@
package examples.animal.data;
import static examples.animal.data.AnimalDataDynamicSqlSupport.*;
+import static org.assertj.core.api.Assertions.as;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.within;
+import static org.assertj.core.api.InstanceOfAssertFactories.DOUBLE;
+import static org.assertj.core.api.InstanceOfAssertFactories.MAP;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.mybatis.dynamic.sql.SqlBuilder.*;
@@ -97,9 +100,10 @@ void testSelectAllRows() {
.build()
.render(RenderingStrategies.MYBATIS3);
List animals = mapper.selectMany(selectStatement);
+
assertAll(
() -> assertThat(animals).hasSize(65),
- () -> assertThat(animals.get(0).getId()).isEqualTo(1)
+ () -> assertThat(animals).first().isNotNull().extracting(AnimalData::getId).isEqualTo(1)
);
}
}
@@ -118,7 +122,7 @@ void testSelectAllRowsWithRowBounds() {
List animals = mapper.selectManyWithRowBounds(selectStatement, rowBounds);
assertAll(
() -> assertThat(animals).hasSize(6),
- () -> assertThat(animals.get(0).getId()).isEqualTo(5)
+ () -> assertThat(animals).first().isNotNull().extracting(AnimalData::getId).isEqualTo(5)
);
}
}
@@ -135,7 +139,7 @@ void testSelectAllRowsWithOrder() {
List animals = mapper.selectMany(selectStatement);
assertAll(
() -> assertThat(animals).hasSize(65),
- () -> assertThat(animals.get(0).getId()).isEqualTo(65)
+ () -> assertThat(animals).first().isNotNull().extracting(AnimalData::getId).isEqualTo(65)
);
}
}
@@ -153,8 +157,9 @@ void testSelectAllRowsAllColumns() {
assertAll(
() -> assertThat(selectStatement.getSelectStatement()).isEqualTo("select * from AnimalData order by id DESC"),
() -> assertThat(animals).hasSize(65),
- () -> assertThat(animals.get(0)).containsEntry("ID", 65),
- () -> assertThat(animals.get(0)).containsEntry("ANIMAL_NAME", "Brachiosaurus")
+ () -> assertThat(animals).first().isNotNull()
+ .extracting("ID", "ANIMAL_NAME")
+ .containsExactly(65, "Brachiosaurus")
);
}
}
@@ -172,7 +177,8 @@ void testSelectAllRowsAllColumnsWithOrder() {
assertAll(
() -> assertThat(selectStatement.getSelectStatement()).isEqualTo("select * from AnimalData order by id DESC"),
() -> assertThat(animals).hasSize(65),
- () -> assertThat(animals.get(0).getId()).isEqualTo(65)
+ () -> assertThat(animals).first().isNotNull()
+ .extracting(AnimalData::getId).isEqualTo(65)
);
}
}
@@ -190,7 +196,7 @@ void testSelectAllRowsAllColumnsWithOrderAndAlias() {
assertAll(
() -> assertThat(selectStatement.getSelectStatement()).isEqualTo("select ad.* from AnimalData ad order by id DESC"),
() -> assertThat(animals).hasSize(65),
- () -> assertThat(animals.get(0).getId()).isEqualTo(65)
+ () -> assertThat(animals).first().isNotNull().extracting(AnimalData::getId).isEqualTo(65)
);
}
}
@@ -840,8 +846,8 @@ void testLikeCaseInsensitive() {
assertAll(
() -> assertThat(animals).hasSize(2),
- () -> assertThat(animals.get(0).getAnimalName()).isEqualTo("Ground squirrel"),
- () -> assertThat(animals.get(1).getAnimalName()).isEqualTo("Artic ground squirrel")
+ () -> assertThat(animals).element(0).isNotNull().extracting(AnimalData::getAnimalName).isEqualTo("Ground squirrel"),
+ () -> assertThat(animals).element(1).isNotNull().extracting(AnimalData::getAnimalName).isEqualTo("Artic ground squirrel")
);
}
}
@@ -861,8 +867,10 @@ void testLikeLowerCase() {
assertAll(
() -> assertThat(animals).hasSize(2),
- () -> assertThat(animals.get(0)).containsEntry("ANIMALNAME", "ground squirrel"),
- () -> assertThat(animals.get(1)).containsEntry("ANIMALNAME", "artic ground squirrel")
+ () -> assertThat(animals).element(0).isNotNull()
+ .extracting("ANIMALNAME").isEqualTo("ground squirrel"),
+ () -> assertThat(animals).element(1).isNotNull()
+ .extracting("ANIMALNAME").isEqualTo("artic ground squirrel")
);
}
}
@@ -882,8 +890,10 @@ void testLikeUpperCase() {
assertAll(
() -> assertThat(animals).hasSize(2),
- () -> assertThat(animals.get(0)).containsEntry("ANIMALNAME", "GROUND SQUIRREL"),
- () -> assertThat(animals.get(1)).containsEntry("ANIMALNAME", "ARTIC GROUND SQUIRREL")
+ () -> assertThat(animals).element(0).isNotNull().extracting("ANIMALNAME")
+ .isEqualTo("GROUND SQUIRREL"),
+ () -> assertThat(animals).element(1).isNotNull().extracting("ANIMALNAME")
+ .isEqualTo("ARTIC GROUND SQUIRREL")
);
}
}
@@ -902,9 +912,13 @@ void testLength() {
List