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 55eea3d0df
commit 8663136608
4 changed files with 28 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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