protected QueryTree getTree() { if (queryTree == null) { try { queryTree = new QueryTree(model, query); } catch (JPA2RecognitionException e) { throw new JpqlSyntaxException(format("Errors found for input JPQL:[%s]\n%s", StringUtils.strip(query), e.getMessage())); } List<ErrorRec> errors = new ArrayList<>(queryTree.getInvalidIdVarNodes()); if (!errors.isEmpty()) { throw new JpqlSyntaxException(format("Errors found for input JPQL:[%s]", StringUtils.strip(query)), errors); } } return queryTree; }
protected QueryTree getTree() { if (queryTree == null) { try { queryTree = new QueryTree(model, query); } catch (JPA2RecognitionException e) { throw new JpqlSyntaxException(format("Errors found for input JPQL:[%s]\n%s", StringUtils.strip(query), e.getMessage())); } List<ErrorRec> errors = new ArrayList<>(queryTree.getInvalidIdVarNodes()); if (!errors.isEmpty()) { throw new JpqlSyntaxException(format("Errors found for input JPQL:[%s]", StringUtils.strip(query)), errors); } } return queryTree; }
private HintResponse hintFieldName(String lastWord, String input, int caretPosition, Set<InferredType> expectedTypes) throws RecognitionException { QueryTree queryTree = null; try { queryTree = new QueryTree(model, input, false); } catch (JPA2RecognitionException e) { List<String> errorMessages = new ArrayList<>();