public class SQLDeArger
extends java.lang.Object
Constructor and Description |
---|
SQLDeArger(java.lang.String sql)
Accepts string to parse
|
SQLDeArger(java.lang.String sql,
java.util.List matchStrings)
Accepts strings to parse and a List of strings to check to see if they are in the sql statement.
|
Modifier and Type | Method and Description |
---|---|
void |
addMatchString(java.lang.String matchString)
Add string to see if it matches in the query
|
java.lang.String[] |
getMatches()
Returns an array of Strings that matched the Strings specified in
the matches arraylist.
|
int |
getNumMatches()
Returns the number of matches or 0 if there were none
|
java.lang.String |
getParsedSQL()
Return sql with original argument values replaced with '?'.
|
java.lang.String |
getSQLToParse()
Get sql that was passed in to parse.
|
java.lang.String |
getSQLType()
Return the first word from the sql command.
|
boolean |
hasMatches()
Returns true if there were any matches against the match Strings
|
static void |
main(java.lang.String[] args)
Method that has test code for this class.
|
static void |
putSQLType(java.lang.String type)
SQL types are the first word that is in a sql statement.
|
public SQLDeArger(java.lang.String sql)
public SQLDeArger(java.lang.String sql, java.util.List matchStrings)
sql
- matchStrings
- public java.lang.String getParsedSQL()
public java.lang.String getSQLToParse()
public java.lang.String getSQLType()
public java.lang.String[] getMatches()
public boolean hasMatches()
public int getNumMatches()
public void addMatchString(java.lang.String matchString)
public static void putSQLType(java.lang.String type)
type
- public static void main(java.lang.String[] args)