Skip to content

Commit d762931

Browse files
committed
Refine AOT execution for derived queries.
We now provide an extension to directly run queries constructed from a derived query method to avoid leaking internals into AOT-generated code. Closes #2140
1 parent c4e0112 commit d762931

File tree

3 files changed

+233
-127
lines changed

3 files changed

+233
-127
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/aot/AotRepositoryFragmentSupport.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.springframework.data.jdbc.core.JdbcAggregateOperations;
3939
import org.springframework.data.jdbc.core.convert.JdbcColumnTypes;
4040
import org.springframework.data.jdbc.core.mapping.JdbcValue;
41-
import org.springframework.data.jdbc.repository.query.EscapingParameterSource;
4241
import org.springframework.data.jdbc.repository.query.JdbcParameters;
4342
import org.springframework.data.jdbc.repository.query.JdbcValueBindUtil;
4443
import org.springframework.data.jdbc.repository.query.RowMapperFactory;
@@ -60,6 +59,8 @@
6059

6160
/**
6261
* Support class for JDBC AOT repository fragments.
62+
* <p>
63+
* This class is indented to be used by generated AOT fragments and not to be used directly.
6364
*
6465
* @author Mark Paluch
6566
* @since 4.0
@@ -141,10 +142,6 @@ protected NamedParameterJdbcOperations getJdbcOperations() {
141142
return DataAccessUtils.uniqueResult(results);
142143
}
143144

144-
protected SqlParameterSource escapingParameterSource(SqlParameterSource parameterSource) {
145-
return new EscapingParameterSource(parameterSource, getDialect().getLikeEscaper());
146-
}
147-
148145
protected @Nullable Object escape(@Nullable Object value) {
149146

150147
if (value == null) {

0 commit comments

Comments
 (0)