Interface JdbcDialect
- All Known Implementing Classes:
BasicJdbcDialect,Db2Dialect,H2Dialect,MySqlDialect,OracleDialect,SqlServerDialect
public interface JdbcDialect
Represents a dialect of SQL implemented by a particular RDBMS.
-
Method Summary
Modifier and TypeMethodDescriptionEscape an identifier.intGives the JDBC driver a hint how many rows should be fetched from the database when more rows are needed.intGet max query parameters count.booleanhasMerge()Test if a dialect supports merge syntax.insertQuery(String fullTblName, Collection<String> keyCols, Collection<String> valCols) Construct insert query.loadCacheQuery(String fullTblName, Iterable<String> uniqCols) Construct load cache query.loadCacheRangeQuery(String fullTblName, Collection<String> keyCols, Iterable<String> uniqCols, boolean appendLowerBound, boolean appendUpperBound) Construct load cache query over specified range.loadCacheSelectRangeQuery(String fullTblName, Collection<String> keyCols) Construct query to get ranges bounds.Construct load query.mergeQuery(String fullTblName, Collection<String> keyCols, Collection<String> uniqCols) Construct merge query.removeQuery(String fullTblName, Iterable<String> keyCols) Construct remove query.updateQuery(String fullTblName, Collection<String> keyCols, Iterable<String> valCols) Construct update query.
-
Method Details
-
escape
Escape an identifier.- Parameters:
ident- SQL identifier to escape.- Returns:
- Escaped SQL identifier.
-
loadCacheSelectRangeQuery
Construct query to get ranges bounds.- Parameters:
fullTblName- Full table name.keyCols- Database key columns for order.- Returns:
- Query for select count.
-
loadCacheRangeQuery
String loadCacheRangeQuery(String fullTblName, Collection<String> keyCols, Iterable<String> uniqCols, boolean appendLowerBound, boolean appendUpperBound) Construct load cache query over specified range.- Parameters:
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.- Returns:
- Query for select count.
-
loadCacheQuery
Construct load cache query.- Parameters:
fullTblName- Full table name.uniqCols- Database unique value columns.- Returns:
- Load cache query.
-
loadQuery
Construct load query.- Parameters:
fullTblName- Full table name.keyCols- Database key columns.cols- Selected columns.keyCnt- Key count.- Returns:
- Load query.
-
insertQuery
Construct insert query.- Parameters:
fullTblName- Full table name.keyCols- Database key columns.valCols- Database value columns.- Returns:
- Insert query.
-
updateQuery
Construct update query.- Parameters:
fullTblName- Full table name.keyCols- Database key columns.valCols- Database value columns.- Returns:
- Update query.
-
hasMerge
boolean hasMerge()Test if a dialect supports merge syntax.- Returns:
Trueif database support merge operation.
-
mergeQuery
Construct merge query.- Parameters:
fullTblName- Full table name.keyCols- Database key columns.uniqCols- Database unique value columns.- Returns:
- Merge query.
-
removeQuery
Construct remove query.- Parameters:
fullTblName- Full table name.keyCols- Database key columns.- Returns:
- Remove query.
-
getMaxParameterCount
int getMaxParameterCount()Get max query parameters count.- Returns:
- Max query parameters count.
-
getFetchSize
int getFetchSize()Gives the JDBC driver a hint how many rows should be fetched from the database when more rows are needed. If the value specified is zero, then the hint is ignored. The default value is zero.- Returns:
- The fetch size for result sets.
-