Improve Sybase and SQLServer blob lob generation

This commit is contained in:
Andrea Boriero 2024-04-23 09:18:55 +02:00 committed by Christian Beikov
parent 8f9d1a15ad
commit 742fc4c60a
4 changed files with 28 additions and 4 deletions

View File

@ -127,7 +127,13 @@ public class SQLServerLegacyDialect extends AbstractTransactSQLDialect {
case BLOB:
case CLOB:
case NCLOB:
return Size.length( getDefaultLobLength() );
return super.resolveSize(
jdbcType,
javaType,
precision,
scale,
length == null ? getDefaultLobLength() : length
);
default:
return super.resolveSize( jdbcType, javaType, precision, scale, length );
}

View File

@ -104,7 +104,13 @@ public class SybaseLegacyDialect extends AbstractTransactSQLDialect {
case Types.NCLOB:
case Types.CLOB:
case Types.BLOB:
return Size.length( getDefaultLobLength() );
return super.resolveSize(
jdbcType,
javaType,
precision,
scale,
length == null ? getDefaultLobLength() : length
);
case Types.FLOAT:
// Sybase ASE allows FLOAT with a precision up to 48
if ( precision != null ) {

View File

@ -148,7 +148,13 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
case BLOB:
case CLOB:
case NCLOB:
return Size.length( getDefaultLobLength() );
return super.resolveSize(
jdbcType,
javaType,
precision,
scale,
length == null ? getDefaultLobLength() : length
);
default:
return super.resolveSize( jdbcType, javaType, precision, scale, length );
}

View File

@ -72,7 +72,13 @@ public class SybaseASEDialect extends SybaseDialect {
case Types.NCLOB:
case Types.CLOB:
case Types.BLOB:
return Size.length( getDefaultLobLength() );
return super.resolveSize(
jdbcType,
javaType,
precision,
scale,
length == null ? getDefaultLobLength() : length
);
case Types.FLOAT:
// Sybase ASE allows FLOAT with a precision up to 48
if ( precision != null ) {