public class SQLQueryValidation
extends java.lang.Object
Constructor and Description |
---|
SQLQueryValidation(java.lang.String _query,
boolean _onlyWhereStatement)
Default constructor with a parameter
|
Modifier and Type | Method and Description |
---|---|
java.lang.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
|
java.lang.String |
getErrorPositionAsMessage()
Returns an string with a text describing the (first) position of the error
|
java.lang.String |
getTokenThatProducedTheSyntacticError()
Returns the token where the validator failed
|
boolean |
validateQuery()
Validates a query
Returns 'null' if there has been some error
|
public SQLQueryValidation(java.lang.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 java.lang.String getErrorMessage()
public java.lang.String getErrorPositionAsMessage()
public int[] getErrorPosition()
public java.lang.String getTokenThatProducedTheSyntacticError()