HHH-7298 seems DB2 do not support set lock timeout from statement level
This commit is contained in:
parent
0996a970ab
commit
c02de61f24
|
@ -176,67 +176,67 @@ public class DB2Dialect extends Dialect {
|
|||
|
||||
getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, NO_BATCH );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLowercaseFunction() {
|
||||
return "lcase";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAddColumnString() {
|
||||
return "add column";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dropConstraints() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsIdentityColumns() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentitySelectString() {
|
||||
return "values identity_val_local()";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentityColumnString() {
|
||||
return "generated by default as identity"; //not null ... (start with 1) is implicit
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentityInsertString() {
|
||||
return "default";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSequenceNextValString(String sequenceName) {
|
||||
return "values nextval for " + sequenceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCreateSequenceString(String sequenceName) {
|
||||
return "create sequence " + sequenceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDropSequenceString(String sequenceName) {
|
||||
return "drop sequence " + sequenceName + " restrict";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSequences() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsPooledSequences() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQuerySequencesString() {
|
||||
return "select seqname from sysibm.syssequences";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsLimit() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsVariableLimit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLimitString(String sql, int offset, int limit) {
|
||||
if ( offset == 0 ) {
|
||||
return sql + " fetch first " + limit + " rows only";
|
||||
|
@ -262,30 +262,36 @@ public class DB2Dialect extends Dialect {
|
|||
*
|
||||
* @return zeroBasedFirstResult
|
||||
*/
|
||||
@Override
|
||||
public int convertToFirstRowValue(int zeroBasedFirstResult) {
|
||||
return zeroBasedFirstResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getForUpdateString() {
|
||||
return " for read only with rs use and keep update locks";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useMaxForLimit() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsOuterJoinForUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsNotNullUnique() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsExistsInSelect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
//as far as I know, DB2 doesn't support this
|
||||
@Override
|
||||
public boolean supportsLockTimeouts() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public String getSelectClauseNullString(int sqlType) {
|
||||
String literal;
|
||||
switch ( sqlType ) {
|
||||
|
@ -326,15 +332,15 @@ public class DB2Dialect extends Dialect {
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnionAll() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException {
|
||||
return col;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet getResultSet(CallableStatement ps) throws SQLException {
|
||||
boolean isResultSet = ps.execute();
|
||||
// This assumes you will want to ignore any update counts
|
||||
|
@ -346,35 +352,35 @@ public class DB2Dialect extends Dialect {
|
|||
// but you can't do it now or the ResultSet you just got will be closed
|
||||
return rs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCommentOn() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTemporaryTables() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCreateTemporaryTableString() {
|
||||
return "declare global temporary table";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCreateTemporaryTablePostfix() {
|
||||
return "not logged";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTemporaryTableName(String baseTableName) {
|
||||
return "session." + super.generateTemporaryTableName( baseTableName );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCurrentTimestampSelection() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentTimestampSelectString() {
|
||||
return "values current timestamp";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCurrentTimestampSelectStringCallable() {
|
||||
return false;
|
||||
}
|
||||
|
@ -387,6 +393,7 @@ public class DB2Dialect extends Dialect {
|
|||
*
|
||||
* @return True.
|
||||
*/
|
||||
@Override
|
||||
public boolean supportsParametersInInsertSelect() {
|
||||
return true;
|
||||
}
|
||||
|
@ -397,32 +404,34 @@ public class DB2Dialect extends Dialect {
|
|||
*
|
||||
* @return True.
|
||||
*/
|
||||
@Override
|
||||
public boolean requiresCastingOfParametersInSelectClause() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() {
|
||||
return false;
|
||||
}
|
||||
|
||||
//DB2 v9.1 doesn't support 'cross join' syntax
|
||||
@Override
|
||||
public String getCrossJoinSeparator() {
|
||||
return ", ";
|
||||
}
|
||||
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@Override
|
||||
public boolean supportsEmptyInList() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsLobValueChangePropogation() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesReadCommittedCauseWritersToBlockReaders() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsTupleDistinctCounts() {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue