Skip to content

Commit

Permalink
HHH-18446 Simplifying
Browse files Browse the repository at this point in the history
  • Loading branch information
cigaly committed Oct 23, 2024
1 parent e88ff3d commit 0276a62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@
public class LongVarbinaryJdbcType extends VarbinaryJdbcType {
public static final LongVarbinaryJdbcType INSTANCE = new LongVarbinaryJdbcType();

private final int jdbcTypeCode;

private final int defaultSqlTypeCode;

public LongVarbinaryJdbcType() {
this(Types.LONGVARBINARY);
}

public LongVarbinaryJdbcType(int jdbcTypeCode) {
this( jdbcTypeCode, jdbcTypeCode );
this( Types.LONGVARBINARY );
}

public LongVarbinaryJdbcType(final int jdbcTypeCode, final int defaultSqlTypeCode) {
this.jdbcTypeCode = jdbcTypeCode;
public LongVarbinaryJdbcType(final int defaultSqlTypeCode) {
this.defaultSqlTypeCode = defaultSqlTypeCode;
}

Expand All @@ -43,6 +36,6 @@ public String toString() {

@Override
public int getJdbcTypeCode() {
return jdbcTypeCode;
return Types.LONGVARBINARY;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,13 @@
public class LongVarcharJdbcType extends VarcharJdbcType {
public static final LongVarcharJdbcType INSTANCE = new LongVarcharJdbcType();

private final int jdbcTypeCode;

private final int defaultSqlTypeCode;

public LongVarcharJdbcType() {
this(Types.LONGVARCHAR);
}

public LongVarcharJdbcType(int jdbcTypeCode) {
this( jdbcTypeCode, jdbcTypeCode );
this( SqlTypes.LONGVARCHAR );
}

public LongVarcharJdbcType(final int jdbcTypeCode, final int defaultSqlTypeCode) {
this.jdbcTypeCode = jdbcTypeCode;
public LongVarcharJdbcType(final int defaultSqlTypeCode) {
this.defaultSqlTypeCode = defaultSqlTypeCode;
}

Expand All @@ -43,7 +36,7 @@ public String toString() {

@Override
public int getJdbcTypeCode() {
return jdbcTypeCode;
return SqlTypes.LONGVARCHAR;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public static void prime(BaselineTarget target) {
target.addDescriptor( BinaryJdbcType.INSTANCE );
target.addDescriptor( VarbinaryJdbcType.INSTANCE );
target.addDescriptor( LongVarbinaryJdbcType.INSTANCE );
target.addDescriptor( new LongVarbinaryJdbcType(SqlTypes.LONGVARBINARY, SqlTypes.LONG32VARBINARY) );
target.addDescriptor( new LongVarbinaryJdbcType( SqlTypes.LONG32VARBINARY) );

target.addDescriptor( CharJdbcType.INSTANCE );
target.addDescriptor( VarcharJdbcType.INSTANCE );
target.addDescriptor( LongVarcharJdbcType.INSTANCE );
target.addDescriptor( new LongVarcharJdbcType(SqlTypes.LONGVARCHAR, SqlTypes.LONG32VARCHAR) );
target.addDescriptor( new LongVarcharJdbcType( SqlTypes.LONG32VARCHAR) );

target.addDescriptor( BlobJdbcType.DEFAULT );
target.addDescriptor( ClobJdbcType.DEFAULT );
Expand All @@ -101,7 +101,7 @@ public static void prime(BaselineTarget target) {
target.addDescriptor( Types.NVARCHAR, VarcharJdbcType.INSTANCE );
target.addDescriptor( Types.LONGNVARCHAR, LongVarcharJdbcType.INSTANCE );
target.addDescriptor( Types.NCLOB, ClobJdbcType.DEFAULT );
target.addDescriptor( new LongVarcharJdbcType(SqlTypes.LONGVARCHAR, SqlTypes.LONG32NVARCHAR) );
target.addDescriptor( new LongVarcharJdbcType( SqlTypes.LONG32NVARCHAR) );

target.addDescriptor( RowIdJdbcType.INSTANCE );
}
Expand Down

0 comments on commit 0276a62

Please sign in to comment.