/** * {@inheritDoc} */ @Override protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) { return word.equalsIgnoreCase(FROM) || super.isParsingComplete(wordParser, word, expression); }
/** * {@inheritDoc} */ @Override protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) { return word.equalsIgnoreCase(FROM) || super.isParsingComplete(wordParser, word, expression); }
/** * {@inheritDoc} */ @Override protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) { if (parsingDatabaseType) { return super.isParsingComplete(wordParser, word, expression); } ExpressionFactory factory = getQueryBNF(getEncapsulatedExpressionQueryBNFId()).getExpressionFactory(word); // The first check is used to stop parsing the scalar expression, // example: CAST(e.firstName NUMERIC(2, 3)) and "NUMERIC" is the current word, // it cannot be part of the scalar expression but will be the database type // TODO: Add support for tolerance and the scalar expression is invalid, like // having 'x AND y', it probably should be parsed in its entirety return (factory == null && expression != null) || word.equalsIgnoreCase(AS) || super.isParsingComplete(wordParser, word, expression); }
/** * {@inheritDoc} */ @Override protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) { if (parsingDatabaseType) { return super.isParsingComplete(wordParser, word, expression); } ExpressionFactory factory = getQueryBNF(getEncapsulatedExpressionQueryBNFId()).getExpressionFactory(word); // The first check is used to stop parsing the scalar expression, // example: CAST(e.firstName NUMERIC(2, 3)) and "NUMERIC" is the current word, // it cannot be part of the scalar expression but will be the database type // TODO: Add support for tolerance and the scalar expression is invalid, like // having 'x AND y', it probably should be parsed in its entirety return (factory == null && expression != null) || word.equalsIgnoreCase(AS) || super.isParsingComplete(wordParser, word, expression); }