public class SQLQueryValidation extends Object
Constructor and Description |
---|
SQLQueryValidation(String _query,
boolean _onlyWhereStatement)
Default constructor with a parameter
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorMessage()
Returns an string with an error message if there has been an error, or 'null' if there hasn't been
|
int[] |
getErrorPosition()
Returns the error position (line, column) or (-1, -1) if there hasn't been any error
|
String |
getErrorPositionAsMessage()
Returns an string with a text describing the (first) position of the error
|
String |
getTokenThatProducedTheSyntacticError()
Returns the token where the validator failed
|
boolean |
validateQuery()
Validates a query
Returns 'null' if there has been some error
|
public SQLQueryValidation(String _query, boolean _onlyWhereStatement)
_query
- The query to validate_onlyWhereStatement
- If the query is only the part of WHERE ... in a querypublic boolean validateQuery()
public String getErrorMessage()
public String getErrorPositionAsMessage()
public int[] getErrorPosition()
public String getTokenThatProducedTheSyntacticError()