Package org.relique.jdbc.csv
Class SqlParser
- java.lang.Object
-
- org.relique.jdbc.csv.SqlParser
-
public class SqlParser extends java.lang.ObjectSQL 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 java.lang.StringgetAlias(int i)java.lang.String[]getColumnNames()java.util.List<java.lang.Object[]>getColumns()Gets the columnNames attribute of the SqlParser objectExpressiongetExpression(int i)java.util.List<Expression>getGroupByColumns()org.relique.jdbc.csv.LogicalExpressiongetHavingClause()intgetLimit()intgetOffset()java.util.List<java.lang.Object[]>getOrderByColumns()intgetPlaceholdersCount()java.util.List<java.lang.String>getTableAliases()java.util.List<java.lang.String>getTableNames()Gets the tableName attribute of the SqlParser objectorg.relique.jdbc.csv.LogicalExpressiongetWhereClause()booleanisDistinct()voidparse(java.lang.String sql)Parses SQL statement.voidsetParsedStatement(org.relique.jdbc.csv.ParsedStatement parsedStatement)voidsetPlaceholdersValues(java.lang.Object[] values)
-
-
-
Method Detail
-
setPlaceholdersValues
public void setPlaceholdersValues(java.lang.Object[] values)
-
getPlaceholdersCount
public int getPlaceholdersCount()
-
getTableNames
public java.util.List<java.lang.String> getTableNames()
Gets the tableName attribute of the SqlParser object- Returns:
- The tableName value
-
getTableAliases
public java.util.List<java.lang.String> getTableAliases()
-
getColumns
public java.util.List<java.lang.Object[]> getColumns()
Gets the columnNames attribute of the SqlParser object- Returns:
- The columnNames value
-
parse
public void parse(java.lang.String sql) throws java.sql.SQLException, ParseExceptionParses SQL statement.- Parameters:
sql- SQL statement to parse.- Throws:
ParseException- if SQL statement cannot be parsed.java.sql.SQLException- if SQL statement is not valid.
-
setParsedStatement
public void setParsedStatement(org.relique.jdbc.csv.ParsedStatement parsedStatement) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getColumnNames
public java.lang.String[] getColumnNames()
-
getWhereClause
public org.relique.jdbc.csv.LogicalExpression getWhereClause()
-
getGroupByColumns
public java.util.List<Expression> getGroupByColumns()
-
getHavingClause
public org.relique.jdbc.csv.LogicalExpression getHavingClause()
-
getOrderByColumns
public java.util.List<java.lang.Object[]> getOrderByColumns()
-
getLimit
public int getLimit()
-
getOffset
public int getOffset()
-
getAlias
public java.lang.String getAlias(int i)
-
getExpression
public Expression getExpression(int i)
-
isDistinct
public boolean isDistinct()
-
-