public class ParamParserDollarMark extends AbstractParamParser
log, REGEX_COLON_MARK, REGEX_DOLLAR_MARK, REGEX_HASH_MARK, REGEX_IN, REGEX_QUESTION_MARK, REGEX_SINGLE_QUOTE
Modifier and Type | Method and Description |
---|---|
String[] |
find(String query)
extract the parameters names from query.
|
static ParamParser |
getInstance() |
String |
getPlaceholder()
Is
$ |
ParamMarkType |
getType() |
String |
replaceForPlaceholder(String query,
Object params)
Replace the parameters names for question marks
|
String |
replaceForPlaceholderWithNumber(String query,
Object params) |
getParamsClauseIN, padspace, replaceForPlaceholder
public static ParamParser getInstance()
public String[] find(String query)
ParamParser
query
- the SQL sentencepublic ParamMarkType getType()
public String getPlaceholder()
$
getPlaceholder
in interface ParamParser
getPlaceholder
in class AbstractParamParser
public String replaceForPlaceholder(String query, Object params)
ParamParser
replaceForPlaceholder
in interface ParamParser
replaceForPlaceholder
in class AbstractParamParser
query
- the SQL sentenceparams
- parameters used at query, its necessary when the query use IN clausepublic String replaceForPlaceholderWithNumber(String query, Object params)
replaceForPlaceholderWithNumber
in interface ParamParser
replaceForPlaceholderWithNumber
in class AbstractParamParser
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.