mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-13 12:45:02 -05:00
JdbcMapper allow wildcards for java.sql.ResultSet
This commit is contained in:
parent
62bf29dc2b
commit
943ac3ac85
@ -601,11 +601,14 @@ public class JdbcMapperProcessor extends AbstractProcessor {
|
||||
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "@JdbcMapper.SQL sql parsed no column names, proper SQL? Wildcard? or bad parser?", methodElement);
|
||||
continue;
|
||||
}
|
||||
for (final String key : keys)
|
||||
if ("*".equals(key)) {
|
||||
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "@JdbcMapper.SQL sql parsed a wildcard column name which is not supported", methodElement);
|
||||
return false;
|
||||
}
|
||||
// wildcards are fine for java.sql.ResultSet and nothing else
|
||||
if (!"java.sql.ResultSet".equals(returnType)) {
|
||||
for (final String key : keys)
|
||||
if ("*".equals(key)) {
|
||||
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "@JdbcMapper.SQL sql parsed a wildcard column name which is not supported", methodElement);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
closeRs = rsm.mapToResultType(w, keys, eeMethod, maxRows, calendarName, cleanerName, !cachePreparedStatements, allowReflection ? reflectionFields : null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user