DATAJPA-1679 - Support distinct and subqueries with projections.
Original pull request: #414.
This commit is contained in:
@@ -80,6 +80,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Grégoire Druant
|
||||
* @author Mohammad Hewedy
|
||||
* @author Andriy Redko
|
||||
* @author Peter Großmann
|
||||
*/
|
||||
public abstract class QueryUtils {
|
||||
|
||||
@@ -103,7 +104,7 @@ public abstract class QueryUtils {
|
||||
|
||||
private static final Pattern ALIAS_MATCH;
|
||||
private static final Pattern COUNT_MATCH;
|
||||
private static final Pattern PROJECTION_CLAUSE = Pattern.compile("select\\s+(.+)\\s+from", Pattern.CASE_INSENSITIVE);
|
||||
private static final Pattern PROJECTION_CLAUSE = Pattern.compile("select\\s+(?:distinct\\s+)?(.+?)\\s+from", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private static final Pattern NO_DIGITS = Pattern.compile("\\D+");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user