public abstract class AbstractDialect<T extends AbstractDialect> extends Object implements Dialect
| 构造器和说明 |
|---|
AbstractDialect() |
AbstractDialect(Driver driver) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
appendmentAfterLikeClause() |
int |
bindLimitParametersAtEndOfQuery(RowSelection selection,
PreparedStatement statement,
int index) |
int |
bindLimitParametersAtStartOfQuery(RowSelection selection,
PreparedStatement statement,
int index) |
protected TableGenerator |
createTableGenerator(DatabaseDescription databaseDescription) |
String |
escape(String string) |
String |
generateTableDDL(DatabaseDescription database,
String catalog,
String schema,
String tableName) |
char |
getAfterQuote()
Get quote for symbol (e.g. table name, field name)
|
char |
getBeforeQuote()
Get quote for symbol (e.g. table name, field name)
|
String |
getDatabaseId() |
Properties |
getDefaultProperties() |
List<Character> |
getLikeKeyChars()
%, _, \ 等
|
LimitHandler |
getLimitHandler() |
String |
getLimitSql(String sql,
RowSelection selection)
Given a limit and an offset, apply the limit clause to the query.
|
String |
getQuotedIdentifier(String identifier)
Database identifier: tableName, columnName, schema, keyword.
|
protected AbstractDialect |
getRealDialect() |
UrlParser |
getUrlParser() |
boolean |
isBindLimitParametersFirst()
limit parameter will be bind in the first or not,
if first ,the
Dialect.bindLimitParametersAtStartOfQuery(RowSelection, PreparedStatement, int) will be execute
else the Dialect.bindLimitParametersAtEndOfQuery(RowSelection, PreparedStatement, int) will be execute |
boolean |
isBindLimitParametersInReverseOrder()
Whether bind parameter in reverse or not.
|
boolean |
isForceLimitUsage()
Generally if there is no, limit applied to a query we do not apply any limits
to the sql query.
|
boolean |
isSupportsBatchSql() |
boolean |
isSupportsBatchUpdates() |
boolean |
isSupportsDistinct()
Whether supports distinct keyword
|
boolean |
isSupportsLimit()
Does this dialect support some form of limiting query results
via a sql clause?
|
boolean |
isSupportsLimitOffset()
Does this dialect's LIMIT support (if any) additionally
support specifying an offset?
|
boolean |
isSupportsVariableLimit()
Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
|
boolean |
isUseLimitInVariableMode()
Whether set limit or offset with placeholder '?'
|
boolean |
isUseMaxForLimit() |
int |
registerResultSetOutParameter(CallableStatement statement,
int position) |
protected void |
setDelegate(T delegate) |
protected void |
setLikeEscaper(LikeEscaper likeEscaper) |
protected void |
setLimitHandler(LimitHandler limitHandler) |
void |
setMaxRows(RowSelection selection,
PreparedStatement statement) |
protected void |
setUrlParser(UrlParser urlParser) |
void |
setUseLimitInVariableMode(boolean variableMode)
Whether set limit or offset with placeholder '?'
|
String |
toString() |
public AbstractDialect()
public AbstractDialect(Driver driver)
public String getDatabaseId()
getDatabaseId 在接口中 Dialectpublic final Properties getDefaultProperties()
public LimitHandler getLimitHandler()
protected void setLimitHandler(LimitHandler limitHandler)
protected void setDelegate(@Nullable
T delegate)
protected void setUrlParser(@NonNull
UrlParser urlParser)
protected void setLikeEscaper(@NonNull
LikeEscaper likeEscaper)
public boolean isSupportsLimit()
DialectisSupportsLimit 在接口中 Dialectpublic boolean isSupportsLimitOffset()
DialectisSupportsLimitOffset 在接口中 Dialectpublic boolean isSupportsVariableLimit()
DialectisSupportsVariableLimit 在接口中 Dialectpublic void setUseLimitInVariableMode(boolean variableMode)
DialectsetUseLimitInVariableMode 在接口中 Dialectpublic boolean isUseLimitInVariableMode()
DialectisUseLimitInVariableMode 在接口中 Dialectpublic boolean isBindLimitParametersInReverseOrder()
DialectHere assume the normal order is: $offset, $limit so the reverse order is: $limit, $offset
Based on the assume, case 1: limit $offset, $limit ==> reverse = false case 2: limit $limit offset $offset ==> reverse = true
isBindLimitParametersInReverseOrder 在接口中 Dialectpublic boolean isBindLimitParametersFirst()
DialectDialect.bindLimitParametersAtStartOfQuery(RowSelection, PreparedStatement, int) will be execute
else the Dialect.bindLimitParametersAtEndOfQuery(RowSelection, PreparedStatement, int) will be executeisBindLimitParametersFirst 在接口中 Dialectpublic boolean isUseMaxForLimit()
isUseMaxForLimit 在接口中 Dialectpublic boolean isForceLimitUsage()
DialectisForceLimitUsage 在接口中 Dialectprotected AbstractDialect getRealDialect()
public int registerResultSetOutParameter(CallableStatement statement, int position) throws SQLException
registerResultSetOutParameter 在接口中 DialectSQLExceptionpublic String getLimitSql(String sql, RowSelection selection)
DialectgetLimitSql 在接口中 Dialectsql - The query to which to apply the limit.public void setMaxRows(RowSelection selection, PreparedStatement statement) throws SQLException
setMaxRows 在接口中 DialectSQLExceptionpublic int bindLimitParametersAtEndOfQuery(RowSelection selection, PreparedStatement statement, int index) throws SQLException
bindLimitParametersAtEndOfQuery 在接口中 DialectSQLExceptionpublic int bindLimitParametersAtStartOfQuery(RowSelection selection, PreparedStatement statement, int index) throws SQLException
bindLimitParametersAtStartOfQuery 在接口中 DialectSQLExceptionpublic UrlParser getUrlParser()
getUrlParser 在接口中 Dialectprotected TableGenerator createTableGenerator(DatabaseDescription databaseDescription)
public final String generateTableDDL(@NonNull DatabaseDescription database, String catalog, String schema, @NonNull String tableName) throws SQLException
generateTableDDL 在接口中 DialectSQLExceptionpublic String getQuotedIdentifier(String identifier)
DialectgetQuotedIdentifier 在接口中 Dialectidentifier - the name can be one of them: tableName, columnName, schemaName etc..public char getBeforeQuote()
DialectgetBeforeQuote 在接口中 Dialectpublic char getAfterQuote()
DialectgetAfterQuote 在接口中 Dialectpublic boolean isSupportsDistinct()
DialectisSupportsDistinct 在接口中 Dialectpublic boolean isSupportsBatchUpdates()
isSupportsBatchUpdates 在接口中 Dialectpublic boolean isSupportsBatchSql()
isSupportsBatchSql 在接口中 Dialectpublic List<Character> getLikeKeyChars()
LikeEscapergetLikeKeyChars 在接口中 LikeEscaperpublic String appendmentAfterLikeClause()
appendmentAfterLikeClause 在接口中 LikeEscaperCopyright © 2020. All rights reserved.