HHH-10087 allow locks to be prepended to SQL

This allows locking code to work for the Teradata database
This commit is contained in:
drepshas 2015-09-04 13:15:46 -07:00 committed by Steve Ebersole
parent 1fa78f9658
commit ac616ccbfa
2 changed files with 3 additions and 3 deletions

View File

@ -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() );

View File

@ -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() );