Examples of SyntaxAnalyser


Examples of org.wso2.carbon.dataservices.core.sqlparser.analysers.SyntaxAnalyser

  public static String[] getColumnNames(String query) throws Exception {
    try {
      Queue<String> tokenQueue = new LexicalAnalyser(query).getTokens();
      if (tokenQueue.size() > 0) {
        SyntaxAnalyser sa = new SyntaxAnalyser(tokenQueue);
        List<String> columns = sa.processSelectStatement();
        return columns.toArray(new String[columns.size()]);
      } else {
        return new String[0];
      }
    } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.dataservices.core.sqlparser.analysers.SyntaxAnalyser

    public static void main(String[] args) {

        String inputString = "SELECT abc,name FROM employee WHERE id=1 OR name='banuka'";

        SyntaxAnalyser sa = new SyntaxAnalyser(new LexicalAnalyser(inputString).getTokens());
        List<String> columns=sa.processSelectStatement();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.