Package org.relique.jdbc.csv
Class SqlParser
- java.lang.Object
-
- 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
Constructors Constructor Description SqlParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlias(int i)
String[]
getColumnNames()
List<Object[]>
getColumns()
Gets the columnNames attribute of the SqlParser objectExpression
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 objectorg.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)
-
-
-
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
-
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()
-
getLimit
public int getLimit()
-
getOffset
public int getOffset()
-
getAlias
public String getAlias(int i)
-
getExpression
public Expression getExpression(int i)
-
isDistinct
public boolean isDistinct()
-
-