Sybase also strips trailing spaces

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-10-31 15:42:56 +01:00
parent eb6f7a0774
commit 3deb8a5467
2 changed files with 6 additions and 1 deletions

View File

@ -582,7 +582,7 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun
/**
* Does this dialect strip trailing spaces from values stored
* in columns of type {@code char(n)}?
* MySQL is the main offender here.
* MySQL and Sybase are the main offenders here.
*/
public boolean stripsTrailingSpacesFromChar() {
return false;

View File

@ -257,6 +257,11 @@ public class SybaseDialect extends AbstractTransactSQLDialect {
return driverKind == SybaseDriverKind.JTDS ? NationalizationSupport.IMPLICIT : super.getNationalizationSupport();
}
@Override
public boolean stripsTrailingSpacesFromChar() {
return true;
}
@Override
public void initializeFunctionRegistry(FunctionContributions functionContributions) {
super.initializeFunctionRegistry( functionContributions );