Remove BIT column type registrations from dialects
This commit is contained in:
parent
9ce2fa9cb4
commit
0f92f53884
|
@ -767,9 +767,7 @@ public abstract class AbstractHANADialect extends Dialect {
|
||||||
registerColumnType( Types.VARCHAR, "clob" );
|
registerColumnType( Types.VARCHAR, "clob" );
|
||||||
registerColumnType( Types.NVARCHAR, "nclob" );
|
registerColumnType( Types.NVARCHAR, "nclob" );
|
||||||
|
|
||||||
registerColumnType( Types.BIT, 1, "boolean" );
|
// map tinyint to smallint since tinyint is unsigned on HANA
|
||||||
// map bit/tinyint to smallint since tinyint is unsigned on HANA
|
|
||||||
registerColumnType( Types.BIT, "smallint" );
|
|
||||||
registerColumnType( Types.TINYINT, "smallint" );
|
registerColumnType( Types.TINYINT, "smallint" );
|
||||||
|
|
||||||
registerHibernateType( Types.NCLOB, StandardBasicTypes.MATERIALIZED_NCLOB.getName() );
|
registerHibernateType( Types.NCLOB, StandardBasicTypes.MATERIALIZED_NCLOB.getName() );
|
||||||
|
|
|
@ -43,9 +43,6 @@ abstract class AbstractTransactSQLDialect extends Dialect {
|
||||||
|
|
||||||
registerColumnType( Types.BOOLEAN, "bit" );
|
registerColumnType( Types.BOOLEAN, "bit" );
|
||||||
|
|
||||||
//SQL Server/Sybase 'bit' type is always exactly one bit
|
|
||||||
registerColumnType( Types.BIT, "smallint" );
|
|
||||||
|
|
||||||
//'tinyint' is an unsigned type in Sybase and
|
//'tinyint' is an unsigned type in Sybase and
|
||||||
//SQL Server, holding values in the range 0-255
|
//SQL Server, holding values in the range 0-255
|
||||||
//see HHH-6779
|
//see HHH-6779
|
||||||
|
|
|
@ -102,7 +102,6 @@ public class DB2Dialect extends Dialect {
|
||||||
//prior to DB2 11, the 'boolean' type existed,
|
//prior to DB2 11, the 'boolean' type existed,
|
||||||
//but was not allowed as a column type
|
//but was not allowed as a column type
|
||||||
registerColumnType( Types.BOOLEAN, "smallint" );
|
registerColumnType( Types.BOOLEAN, "smallint" );
|
||||||
registerColumnType( Types.BIT, 1, "smallint" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
registerColumnType( Types.BLOB, "blob($l)" );
|
registerColumnType( Types.BLOB, "blob($l)" );
|
||||||
|
|
|
@ -98,10 +98,6 @@ public class DerbyDialect extends Dialect {
|
||||||
|
|
||||||
if ( getVersion() < 1070) {
|
if ( getVersion() < 1070) {
|
||||||
registerColumnType( Types.BOOLEAN, "smallint" ); //no boolean before 10.7
|
registerColumnType( Types.BOOLEAN, "smallint" ); //no boolean before 10.7
|
||||||
registerColumnType( Types.BIT, 1, "smallint" ); //no bit
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
registerColumnType( Types.BIT, 1, "boolean" ); //no bit
|
|
||||||
}
|
}
|
||||||
registerColumnType( Types.TINYINT, "smallint" ); //no tinyint
|
registerColumnType( Types.TINYINT, "smallint" ); //no tinyint
|
||||||
registerColumnType( Types.CHAR, 254, "char($l)" );
|
registerColumnType( Types.CHAR, 254, "char($l)" );
|
||||||
|
|
|
@ -157,8 +157,6 @@ public abstract class Dialect implements ConversionContext {
|
||||||
|
|
||||||
protected Dialect() {
|
protected Dialect() {
|
||||||
|
|
||||||
registerColumnType( Types.BIT, 1, "bit" );
|
|
||||||
registerColumnType( Types.BIT, "bit($l)" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "boolean" );
|
registerColumnType( Types.BOOLEAN, "boolean" );
|
||||||
|
|
||||||
registerColumnType( Types.TINYINT, "tinyint" );
|
registerColumnType( Types.TINYINT, "tinyint" );
|
||||||
|
|
|
@ -94,9 +94,6 @@ public class FirebirdDialect extends Dialect {
|
||||||
super();
|
super();
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
|
||||||
registerColumnType( Types.BIT, 1, "smallint" );
|
|
||||||
registerColumnType( Types.BIT, "smallint" );
|
|
||||||
|
|
||||||
if ( getVersion() < 300 ) {
|
if ( getVersion() < 300 ) {
|
||||||
//'boolean' type introduced in 3.0
|
//'boolean' type introduced in 3.0
|
||||||
registerColumnType( Types.BOOLEAN, "smallint" );
|
registerColumnType( Types.BOOLEAN, "smallint" );
|
||||||
|
|
|
@ -91,8 +91,6 @@ public class H2Dialect extends Dialect {
|
||||||
? OffsetFetchLimitHandler.INSTANCE
|
? OffsetFetchLimitHandler.INSTANCE
|
||||||
: LimitOffsetLimitHandler.INSTANCE;
|
: LimitOffsetLimitHandler.INSTANCE;
|
||||||
|
|
||||||
//Note: H2 'bit' is a synonym for 'boolean', not a proper bit type
|
|
||||||
// registerColumnType( Types.BIT, "bit" );
|
|
||||||
if ( version < 102139 ) {
|
if ( version < 102139 ) {
|
||||||
final int majorVersion = version / 100000;
|
final int majorVersion = version / 100000;
|
||||||
final int minorVersion = version % 100000 / 1000;
|
final int minorVersion = version % 100000 / 1000;
|
||||||
|
|
|
@ -74,10 +74,6 @@ public class InformixDialect extends Dialect {
|
||||||
super();
|
super();
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
|
||||||
// Informix doesn't have a bit type
|
|
||||||
registerColumnType( Types.BIT, 1, "boolean" );
|
|
||||||
registerColumnType( Types.BIT, "smallint" );
|
|
||||||
|
|
||||||
registerColumnType( Types.TINYINT, "smallint" );
|
registerColumnType( Types.TINYINT, "smallint" );
|
||||||
registerColumnType( Types.BIGINT, "int8" );
|
registerColumnType( Types.BIGINT, "int8" );
|
||||||
|
|
||||||
|
|
|
@ -87,14 +87,11 @@ public class IngresDialect extends Dialect {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
|
||||||
if ( getVersion() < 1000 ) {
|
if ( getVersion() < 1000 ) {
|
||||||
registerColumnType( Types.BIT, 1, "tinyint" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "tinyint" );
|
registerColumnType( Types.BOOLEAN, "tinyint" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
registerColumnType( Types.BIT, 1, "boolean" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "boolean" );
|
registerColumnType( Types.BOOLEAN, "boolean" );
|
||||||
}
|
}
|
||||||
registerColumnType( Types.BIT, "tinyint" );
|
|
||||||
|
|
||||||
registerColumnType( Types.NUMERIC, "decimal($p, $s)" ); //Ingres has no 'numeric' type
|
registerColumnType( Types.NUMERIC, "decimal($p, $s)" ); //Ingres has no 'numeric' type
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class MaxDBDialect extends Dialect {
|
||||||
|
|
||||||
public MaxDBDialect() {
|
public MaxDBDialect() {
|
||||||
super();
|
super();
|
||||||
registerColumnType( Types.BIT, 1, "boolean" ); //no BIT type
|
|
||||||
registerColumnType( Types.TINYINT, "smallint" );
|
registerColumnType( Types.TINYINT, "smallint" );
|
||||||
|
|
||||||
registerColumnType( Types.BIGINT, "fixed(19,0)" );
|
registerColumnType( Types.BIGINT, "fixed(19,0)" );
|
||||||
|
|
|
@ -50,10 +50,7 @@ public class MimerSQLDialect extends Dialect {
|
||||||
|
|
||||||
public MimerSQLDialect() {
|
public MimerSQLDialect() {
|
||||||
super();
|
super();
|
||||||
//no 'bit' type
|
|
||||||
registerColumnType( Types.BIT, 1, "boolean" );
|
|
||||||
//no 'tinyint', so use integer with 3 decimal digits
|
//no 'tinyint', so use integer with 3 decimal digits
|
||||||
registerColumnType( Types.BIT, "integer(3)" );
|
|
||||||
registerColumnType( Types.TINYINT, "integer(3)" );
|
registerColumnType( Types.TINYINT, "integer(3)" );
|
||||||
|
|
||||||
//Mimer CHARs are ASCII!!
|
//Mimer CHARs are ASCII!!
|
||||||
|
|
|
@ -521,8 +521,6 @@ public class OracleDialect extends Dialect {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void registerNumericTypeMappings() {
|
protected void registerNumericTypeMappings() {
|
||||||
registerColumnType( Types.BIT, 1, "number(1,0)" );
|
|
||||||
registerColumnType( Types.BIT, "number(3,0)" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "number(1,0)" );
|
registerColumnType( Types.BOOLEAN, "number(1,0)" );
|
||||||
|
|
||||||
registerColumnType( Types.BIGINT, "number(19,0)" );
|
registerColumnType( Types.BIGINT, "number(19,0)" );
|
||||||
|
|
|
@ -83,8 +83,6 @@ public class RDMSOS2200Dialect extends Dialect {
|
||||||
* Note that $l (dollar-L) will use the length value if provided.
|
* Note that $l (dollar-L) will use the length value if provided.
|
||||||
* Also new for Hibernate3 is the $p percision and $s (scale) parameters
|
* Also new for Hibernate3 is the $p percision and $s (scale) parameters
|
||||||
*/
|
*/
|
||||||
registerColumnType( Types.BIT, 1, "smallint" );
|
|
||||||
registerColumnType( Types.BIT, "smallint" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "smallint" );
|
registerColumnType( Types.BOOLEAN, "smallint" );
|
||||||
registerColumnType( Types.TINYINT, "smallint" );
|
registerColumnType( Types.TINYINT, "smallint" );
|
||||||
registerColumnType( Types.BIGINT, "numeric(19,0)" );
|
registerColumnType( Types.BIGINT, "numeric(19,0)" );
|
||||||
|
|
|
@ -64,8 +64,6 @@ public class SpannerDialect extends Dialect {
|
||||||
|
|
||||||
public SpannerDialect() {
|
public SpannerDialect() {
|
||||||
registerColumnType( Types.BOOLEAN, "bool" );
|
registerColumnType( Types.BOOLEAN, "bool" );
|
||||||
registerColumnType( Types.BIT, 1, "bool" );
|
|
||||||
registerColumnType( Types.BIT, "int64" );
|
|
||||||
|
|
||||||
registerColumnType( Types.TINYINT, "int64" );
|
registerColumnType( Types.TINYINT, "int64" );
|
||||||
registerColumnType( Types.SMALLINT, "int64" );
|
registerColumnType( Types.SMALLINT, "int64" );
|
||||||
|
|
|
@ -54,7 +54,6 @@ public class SybaseASEDialect extends SybaseDialect {
|
||||||
//tinyint to store signed bytes, we can use it
|
//tinyint to store signed bytes, we can use it
|
||||||
//to store boolean values)
|
//to store boolean values)
|
||||||
registerColumnType( Types.BOOLEAN, "tinyint" );
|
registerColumnType( Types.BOOLEAN, "tinyint" );
|
||||||
registerColumnType( Types.BIT, 1, "tinyint" );
|
|
||||||
|
|
||||||
|
|
||||||
if ( getVersion() >= 1500 ) {
|
if ( getVersion() >= 1500 ) {
|
||||||
|
|
|
@ -80,8 +80,6 @@ public class TeradataDialect extends Dialect {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
|
||||||
registerColumnType( Types.BOOLEAN, "byteint" );
|
registerColumnType( Types.BOOLEAN, "byteint" );
|
||||||
registerColumnType( Types.BIT, 1, "byteint" );
|
|
||||||
registerColumnType( Types.BIT, "byteint" );
|
|
||||||
|
|
||||||
registerColumnType( Types.TINYINT, "byteint" );
|
registerColumnType( Types.TINYINT, "byteint" );
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,6 @@ public class TimesTenDialect extends Dialect {
|
||||||
//Note: these are the correct type mappings
|
//Note: these are the correct type mappings
|
||||||
// for the default Oracle type mode
|
// for the default Oracle type mode
|
||||||
// TypeMode=0
|
// TypeMode=0
|
||||||
registerColumnType( Types.BIT, 1, "tt_tinyint" );
|
|
||||||
registerColumnType( Types.BIT, "tt_tinyint" );
|
|
||||||
registerColumnType( Types.BOOLEAN, "tt_tinyint" );
|
registerColumnType( Types.BOOLEAN, "tt_tinyint" );
|
||||||
|
|
||||||
registerColumnType(Types.TINYINT, "tt_tinyint");
|
registerColumnType(Types.TINYINT, "tt_tinyint");
|
||||||
|
|
Loading…
Reference in New Issue