public class ParsedSql extends Object
Constructor and Description |
---|
ParsedSql(String originalSql)
Create a new instance of the
ParsedSql class. |
Modifier and Type | Method and Description |
---|---|
void |
addNamedParameter(String parameterName,
int startIndex,
int endIndex)
Add a named parameter parsed from this SQL statement.
|
int |
getNamedParameterCount()
Return the count of named parameters in the SQL statement.
|
String |
getOriginalSql()
Return the SQL statement that is being parsed.
|
int[] |
getParameterIndexes(int parameterPosition)
Return the parameter indexes for the specified parameter.
|
List<String> |
getParameterNames()
Return all of the parameters (bind variables) in the parsed SQL statement.
|
int |
getTotalParameterCount()
Return the total count of all of the parameters in the SQL statement.
|
int |
getUnnamedParameterCount()
Return the count of all of the unnamed parameters in the SQL statement.
|
void |
setNamedParameterCount(int namedParameterCount)
Set the count of named parameters in the SQL statement.
|
void |
setTotalParameterCount(int totalParameterCount)
Set the total count of all of the parameters in the SQL statement.
|
void |
setUnnamedParameterCount(int unnamedParameterCount)
Set the count of all of the unnamed parameters in the SQL statement.
|
String |
toString()
Exposes the original SQL String.
|
public String getOriginalSql()
public void addNamedParameter(String parameterName, int startIndex, int endIndex)
parameterName
- the name of the parameterstartIndex
- the start index in the original SQL StringendIndex
- the end index in the original SQL Stringpublic List<String> getParameterNames()
public int[] getParameterIndexes(int parameterPosition)
parameterPosition
- the position of the parameter
(as index in the parameter names List)public int getNamedParameterCount()
public void setNamedParameterCount(int namedParameterCount)
public int getUnnamedParameterCount()
public void setUnnamedParameterCount(int unnamedParameterCount)
public int getTotalParameterCount()
public void setTotalParameterCount(int totalParameterCount)
Copyright © 2006–2018 TinyGroup. All rights reserved.