@Test public void testParseExpression() throws Exception { Expression result = CCJSqlParserUtil.parseExpression("a+b"); assertEquals("a + b", result.toString()); assertTrue(result instanceof Addition); Addition add = (Addition)result; assertTrue(add.getLeftExpression() instanceof Column); assertTrue(add.getRightExpression() instanceof Column); }
public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); static Statement parse(Reader statementReader); static Statement parse(String sql); static Node parseAST(String sql); static Statement parse(InputStream is); static Statement parse(InputStream is, String encoding); static Expression parseExpression(String expression); static Expression parseCondExpression(String condExpr); static Statements parseStatements(String sqls); }
CCJSqlParserUtil { public static Expression parseExpression(String expression) throws JSQLParserException { CCJSqlParser parser = new CCJSqlParser(new StringReader(expression)); try { return parser.SimpleExpression(); } catch (Exception ex) { throw new JSQLParserException(ex); } } private  CCJSqlParserUtil(); static Statement parse(Reader statementReader); static Statement parse(String sql); static Node parseAST(String sql); static Statement parse(InputStream is); static Statement parse(InputStream is, String encoding); static Expression parseExpression(String expression); static Expression parseCondExpression(String condExpr); static Statements parseStatements(String sqls);  }