HHH-10087 allow locks to be prepended to SQL
This allows locking code to work for the Teradata database
This commit is contained in:
parent
1fa78f9658
commit
ac616ccbfa
|
@ -184,7 +184,7 @@ public class SelectStatementBuilder {
|
|||
* @return the SQL <tt>SELECT</tt> statement.
|
||||
*/
|
||||
public String toStatementString() {
|
||||
final StringBuilder buf = new StringBuilder( guesstimatedBufferSize );
|
||||
StringBuilder buf = new StringBuilder( guesstimatedBufferSize );
|
||||
|
||||
if ( StringHelper.isNotEmpty( comment ) ) {
|
||||
buf.append( "/* " ).append( comment ).append( " */ " );
|
||||
|
@ -219,7 +219,7 @@ public class SelectStatementBuilder {
|
|||
}
|
||||
|
||||
if ( lockOptions.getLockMode() != LockMode.NONE ) {
|
||||
buf.append( dialect.getForUpdateString( lockOptions ) );
|
||||
buf = new StringBuilder(dialect.applyLocksToSql( buf.toString(), lockOptions, null ) );
|
||||
}
|
||||
|
||||
return dialect.transformSelectString( buf.toString() );
|
||||
|
|
|
@ -179,7 +179,7 @@ public class SimpleSelect {
|
|||
}
|
||||
|
||||
if ( lockOptions != null ) {
|
||||
buf.append( dialect.getForUpdateString( lockOptions ) );
|
||||
buf = new StringBuilder(dialect.applyLocksToSql( buf.toString(), lockOptions, null ) );
|
||||
}
|
||||
|
||||
return dialect.transformSelectString( buf.toString() );
|
||||
|
|
Loading…
Reference in New Issue