org.relique.jdbc.csv
Class SqlParser

java.lang.Object
  extended by org.relique.jdbc.csv.SqlParser

public class SqlParser
extends Object

SQL parser using JavaCC syntax definition file where.jj.

Author:
Jonathan Ackerman, Juan Pablo Morales, Mario Frasca

Constructor Summary
SqlParser()
           
 
Method Summary
 String getAlias(int i)
           
 String[] getColumnNames()
           
 List<Object[]> getColumns()
          Gets the columnNames attribute of the SqlParser object
 Expression getExpression(int i)
           
 List<Expression> getGroupByColumns()
           
 org.relique.jdbc.csv.LogicalExpression getHavingClause()
           
 int getLimit()
           
 int getOffset()
           
 List<Object[]> getOrderByColumns()
           
 int getPlaceholdersCount()
           
 List<String> getTableAliases()
           
 List<String> getTableNames()
          Gets the tableName attribute of the SqlParser object
 org.relique.jdbc.csv.LogicalExpression getWhereClause()
           
 boolean isDistinct()
           
 void parse(String sql)
          Parses SQL statement.
 void setParsedStatement(org.relique.jdbc.csv.ParsedStatement parsedStatement)
           
 void setPlaceholdersValues(Object[] values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlParser

public SqlParser()
Method Detail

setPlaceholdersValues

public void setPlaceholdersValues(Object[] values)

getPlaceholdersCount

public int getPlaceholdersCount()

getTableNames

public List<String> getTableNames()
Gets the tableName attribute of the SqlParser object

Returns:
The tableName value

getTableAliases

public List<String> getTableAliases()

getColumns

public List<Object[]> getColumns()
Gets the columnNames attribute of the SqlParser object

Returns:
The columnNames value

parse

public void parse(String sql)
           throws SQLException,
                  ParseException
Parses SQL statement.

Parameters:
sql - SQL statement to parse.
Throws:
ParseException - if SQL statement cannot be parsed.
SQLException - if SQL statement is not valid.

setParsedStatement

public void setParsedStatement(org.relique.jdbc.csv.ParsedStatement parsedStatement)
                        throws SQLException
Throws:
SQLException

getColumnNames

public String[] getColumnNames()

getWhereClause

public org.relique.jdbc.csv.LogicalExpression getWhereClause()

getGroupByColumns

public List<Expression> getGroupByColumns()

getHavingClause

public org.relique.jdbc.csv.LogicalExpression getHavingClause()

getOrderByColumns

public List<Object[]> getOrderByColumns()

getLimit

public int getLimit()

getOffset

public int getOffset()

getAlias

public String getAlias(int i)

getExpression

public Expression getExpression(int i)

isDistinct

public boolean isDistinct()


Copyright © 2016. All rights reserved.