public class BasicJdbcDialect extends Object implements JdbcDialect
Modifier and Type | Field and Description |
---|---|
protected static int |
DFLT_MAX_PARAMS_CNT
Default max query parameters count.
|
protected int |
fetchSize
Fetch size.
|
protected int |
maxParamsCnt
Max query parameters count.
|
Constructor and Description |
---|
BasicJdbcDialect() |
Modifier and Type | Method and Description |
---|---|
String |
escape(String ident) |
int |
getFetchSize()
Gives the JDBC driver a hint how many rows should be fetched from the database when more rows are needed.
|
int |
getMaxParameterCount()
Get max query parameters count.
|
boolean |
hasMerge() |
String |
insertQuery(String fullTblName,
Collection<String> keyCols,
Collection<String> valCols)
Construct insert query.
|
String |
loadCacheQuery(String fullTblName,
Iterable<String> uniqCols)
Construct load cache query.
|
String |
loadCacheRangeQuery(String fullTblName,
Collection<String> keyCols,
Iterable<String> uniqCols,
boolean appendLowerBound,
boolean appendUpperBound)
Construct load cache query over specified range.
|
String |
loadCacheSelectRangeQuery(String fullTblName,
Collection<String> keyCols)
Construct query to get ranges bounds.
|
String |
loadQuery(String fullTblName,
Collection<String> keyCols,
Iterable<String> cols,
int keyCnt)
Construct load query.
|
String |
mergeQuery(String fullTblName,
Collection<String> keyCols,
Collection<String> uniqCols)
Construct merge query.
|
protected static String |
mkString(Iterable<String> strs,
String sep)
Concatenates strings using provided separator.
|
protected static String |
mkString(Iterable<String> strs,
String start,
String sep,
String end)
Concatenates elements using provided separator.
|
protected static <T> String |
mkString(Iterable<T> elems,
org.apache.ignite.internal.util.typedef.C1<T,String> f,
String start,
String sep,
String end)
Concatenates elements using provided separator.
|
String |
removeQuery(String fullTblName,
Iterable<String> keyCols)
Construct remove query.
|
protected static String |
repeat(String str,
int cnt,
String start,
String sep,
String end)
Concatenates elements using provided delimiter.
|
void |
setFetchSize(int fetchSize)
Sets fetch size.
|
void |
setMaxParameterCount(int maxParamsCnt)
Set max query parameters count.
|
String |
updateQuery(String fullTblName,
Collection<String> keyCols,
Iterable<String> valCols)
Construct update query.
|
protected static final int DFLT_MAX_PARAMS_CNT
protected int maxParamsCnt
protected int fetchSize
protected static <T> String mkString(Iterable<T> elems, org.apache.ignite.internal.util.typedef.C1<T,String> f, String start, String sep, String end)
elems
- Concatenated elements.f
- closure used for transform element.start
- Start string.sep
- Separator.end
- End string.protected static String mkString(Iterable<String> strs, String start, String sep, String end)
strs
- Concatenated string.start
- Start string.sep
- Delimiter.end
- End string.protected static String mkString(Iterable<String> strs, String sep)
strs
- Concatenated string.sep
- Separator.protected static String repeat(String str, int cnt, String start, String sep, String end)
str
- Repeated string.cnt
- Repeat count.start
- Start string.sep
- Separator.end
- End string.public String escape(String ident)
escape
in interface JdbcDialect
ident
- SQL identifier to escape.public String loadCacheSelectRangeQuery(String fullTblName, Collection<String> keyCols)
loadCacheSelectRangeQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns for order.public String loadCacheRangeQuery(String fullTblName, Collection<String> keyCols, Iterable<String> uniqCols, boolean appendLowerBound, boolean appendUpperBound)
loadCacheRangeQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns for order.uniqCols
- Database unique value columns.appendLowerBound
- Need add lower bound for range.appendUpperBound
- Need add upper bound for range.public String loadCacheQuery(String fullTblName, Iterable<String> uniqCols)
loadCacheQuery
in interface JdbcDialect
fullTblName
- Full table name.uniqCols
- Database unique value columns.public String loadQuery(String fullTblName, Collection<String> keyCols, Iterable<String> cols, int keyCnt)
loadQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns.cols
- Selected columns.keyCnt
- Key count.public String insertQuery(String fullTblName, Collection<String> keyCols, Collection<String> valCols)
insertQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns.valCols
- Database value columns.public String updateQuery(String fullTblName, Collection<String> keyCols, Iterable<String> valCols)
updateQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns.valCols
- Database value columns.public boolean hasMerge()
hasMerge
in interface JdbcDialect
True
if database support merge operation.public String mergeQuery(String fullTblName, Collection<String> keyCols, Collection<String> uniqCols)
mergeQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns.uniqCols
- Database unique value columns.public String removeQuery(String fullTblName, Iterable<String> keyCols)
removeQuery
in interface JdbcDialect
fullTblName
- Full table name.keyCols
- Database key columns.public int getMaxParameterCount()
getMaxParameterCount
in interface JdbcDialect
public void setMaxParameterCount(int maxParamsCnt)
maxParamsCnt
- Max query parameters count.public int getFetchSize()
getFetchSize
in interface JdbcDialect
public void setFetchSize(int fetchSize)
fetchSize
- Fetch size.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024