|
7 | 7 | package org.hibernate.community.dialect;
|
8 | 8 |
|
9 | 9 | import org.hibernate.boot.Metadata;
|
10 |
| -import java.sql.Types; |
11 | 10 |
|
12 | 11 | import org.hibernate.boot.model.FunctionContributions;
|
13 | 12 | import org.hibernate.boot.model.TypeContributions;
|
|
29 | 28 | import org.hibernate.dialect.temptable.TemporaryTable;
|
30 | 29 | import org.hibernate.dialect.temptable.TemporaryTableKind;
|
31 | 30 | import org.hibernate.dialect.unique.UniqueDelegate;
|
32 |
| -import org.hibernate.engine.jdbc.Size; |
33 | 31 | import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
|
34 | 32 | import org.hibernate.engine.spi.LoadQueryInfluencers;
|
35 | 33 | import org.hibernate.engine.spi.SessionFactoryImplementor;
|
|
65 | 63 | import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
|
66 | 64 | import org.hibernate.tool.schema.internal.StandardForeignKeyExporter;
|
67 | 65 | import org.hibernate.tool.schema.spi.Exporter;
|
68 |
| -import org.hibernate.type.descriptor.java.JavaType; |
69 |
| -import org.hibernate.type.descriptor.jdbc.JdbcType; |
70 | 66 | import org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType;
|
71 | 67 | import org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry;
|
72 | 68 | import org.hibernate.type.spi.TypeConfiguration;
|
@@ -119,24 +115,6 @@ public String[] getSqlCreateStrings(
|
119 | 115 | }
|
120 | 116 | };
|
121 | 117 |
|
122 |
| - private final SizeStrategy sizeStrategy = new SizeStrategyImpl() { |
123 |
| - @Override |
124 |
| - public Size resolveSize( |
125 |
| - JdbcType jdbcType, |
126 |
| - JavaType<?> javaType, |
127 |
| - Integer precision, |
128 |
| - Integer scale, |
129 |
| - Long length) { |
130 |
| - switch ( jdbcType.getDdlTypeCode() ) { |
131 |
| - case Types.FLOAT: |
132 |
| - // Informix allows FLOAT with a precision up to 16 |
133 |
| - if ( precision != null ) { |
134 |
| - return Size.precision( Math.min( Math.max( precision, 1 ), 16 ) ); |
135 |
| - } |
136 |
| - } |
137 |
| - return super.resolveSize( jdbcType, javaType, precision, scale, length ); |
138 |
| - } |
139 |
| - }; |
140 | 118 | public InformixDialect(DialectResolutionInfo info) {
|
141 | 119 | this( info.makeCopyOrDefault( DEFAULT_VERSION ) );
|
142 | 120 | registerKeywords( info );
|
@@ -201,7 +179,7 @@ protected void registerColumnTypes(TypeContributions typeContributions, ServiceR
|
201 | 179 | //float(n) and just always defaults to
|
202 | 180 | //double precision.
|
203 | 181 | ddlTypeRegistry.addDescriptor(
|
204 |
| - CapacityDependentDdlType.builder( FLOAT, "float($p)", this ) |
| 182 | + CapacityDependentDdlType.builder( FLOAT, "float", this ) |
205 | 183 | .withTypeCapacity( 8, "smallfloat" )
|
206 | 184 | .build()
|
207 | 185 | );
|
@@ -259,11 +237,6 @@ public int getDoublePrecision() {
|
259 | 237 | return 16;
|
260 | 238 | }
|
261 | 239 |
|
262 |
| - @Override |
263 |
| - public SizeStrategy getSizeStrategy() { |
264 |
| - return sizeStrategy; |
265 |
| - } |
266 |
| - |
267 | 240 | @Override
|
268 | 241 | public void initializeFunctionRegistry(FunctionContributions functionContributions) {
|
269 | 242 | super.initializeFunctionRegistry(functionContributions);
|
|
0 commit comments