File tree Expand file tree Collapse file tree 9 files changed +17
-10
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 9 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 19
19
import java .util .Map ;
20
20
import java .util .TimeZone ;
21
21
22
+ import org .hibernate .Length ;
22
23
import org .hibernate .LockMode ;
23
24
import org .hibernate .LockOptions ;
24
25
import org .hibernate .PessimisticLockException ;
@@ -280,7 +281,7 @@ public int getMaxVarcharCapacity() {
280
281
@ Override
281
282
public int getMaxVarbinaryLength () {
282
283
//postgres has no varbinary-like type
283
- return Integer . MAX_VALUE ;
284
+ return Length . LONG32 ;
284
285
}
285
286
286
287
@ Override
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ public long getDefaultLobLength() {
289
289
// this is essentially the only legal length for
290
290
// a "lob" in SQL Server, i.e. the value of MAX
291
291
// (caveat: for NVARCHAR it is half this value)
292
- return Integer . MAX_VALUE ;
292
+ return Length . LONG32 ;
293
293
}
294
294
295
295
@ Override
Original file line number Diff line number Diff line change 9
9
10
10
import java .util .Map ;
11
11
12
+ import org .hibernate .Length ;
12
13
import org .hibernate .LockOptions ;
13
14
import org .hibernate .boot .model .FunctionContributions ;
14
15
import org .hibernate .community .dialect .identity .SybaseAnywhereIdentityColumnSupport ;
@@ -103,7 +104,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
103
104
104
105
@ Override
105
106
public int getMaxVarcharLength () {
106
- return 32_767 ;
107
+ return Length . LONG16 ;
107
108
}
108
109
109
110
@ Override
Original file line number Diff line number Diff line change @@ -4760,7 +4760,7 @@ public SizeStrategy getSizeStrategy() {
4760
4760
*/
4761
4761
public int getMaxVarcharLength () {
4762
4762
//the longest possible length of a Java string
4763
- return Integer . MAX_VALUE ;
4763
+ return Length . LONG32 ;
4764
4764
}
4765
4765
4766
4766
/**
Original file line number Diff line number Diff line change 17
17
import java .util .Date ;
18
18
import java .util .TimeZone ;
19
19
20
+ import org .hibernate .Length ;
20
21
import org .hibernate .LockOptions ;
21
22
import org .hibernate .PessimisticLockException ;
22
23
import org .hibernate .boot .model .FunctionContributions ;
@@ -534,7 +535,7 @@ public SizeStrategy getSizeStrategy() {
534
535
535
536
@ Override
536
537
public long getDefaultLobLength () {
537
- return Integer . MAX_VALUE ;
538
+ return Length . LONG32 ;
538
539
}
539
540
540
541
@ Override
Original file line number Diff line number Diff line change 17
17
import java .util .regex .Matcher ;
18
18
import java .util .regex .Pattern ;
19
19
20
+ import org .hibernate .Length ;
20
21
import org .hibernate .QueryTimeoutException ;
21
22
import org .hibernate .boot .model .FunctionContributions ;
22
23
import org .hibernate .boot .model .TypeContributions ;
@@ -390,13 +391,13 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
390
391
@ Override
391
392
public int getMaxVarcharLength () {
392
393
//with MAX_STRING_SIZE=EXTENDED, changes to 32_767
393
- return extended ? 32_767 : 4000 ;
394
+ return extended ? Length . LONG16 : 4000 ;
394
395
}
395
396
396
397
@ Override
397
398
public int getMaxVarbinaryLength () {
398
399
//with MAX_STRING_SIZE=EXTENDED, changes to 32_767
399
- return extended ? 32_767 : 2000 ;
400
+ return extended ? Length . LONG16 : 2000 ;
400
401
}
401
402
402
403
@ Override
Original file line number Diff line number Diff line change 19
19
import java .util .Map ;
20
20
import java .util .TimeZone ;
21
21
22
+ import org .hibernate .Length ;
22
23
import org .hibernate .LockMode ;
23
24
import org .hibernate .LockOptions ;
24
25
import org .hibernate .PessimisticLockException ;
@@ -298,7 +299,7 @@ public int getMaxVarcharCapacity() {
298
299
@ Override
299
300
public int getMaxVarbinaryLength () {
300
301
//postgres has no varbinary-like type
301
- return Integer . MAX_VALUE ;
302
+ return Length . LONG32 ;
302
303
}
303
304
304
305
@ Override
Original file line number Diff line number Diff line change 16
16
import java .util .List ;
17
17
import java .util .TimeZone ;
18
18
19
+ import org .hibernate .Length ;
19
20
import org .hibernate .LockMode ;
20
21
import org .hibernate .LockOptions ;
21
22
import org .hibernate .QueryTimeoutException ;
@@ -298,7 +299,7 @@ public long getDefaultLobLength() {
298
299
// this is essentially the only legal length for
299
300
// a "lob" in SQL Server, i.e. the value of MAX
300
301
// (caveat: for NVARCHAR it is half this value)
301
- return Integer . MAX_VALUE ;
302
+ return Length . LONG32 ;
302
303
}
303
304
304
305
@ Override
Original file line number Diff line number Diff line change 11
11
import java .sql .SQLException ;
12
12
import java .sql .Types ;
13
13
14
+ import org .hibernate .Length ;
14
15
import org .hibernate .LockMode ;
15
16
import org .hibernate .LockOptions ;
16
17
import org .hibernate .QueryTimeoutException ;
@@ -176,7 +177,7 @@ public int getMaxVarcharLength() {
176
177
177
178
@ Override
178
179
public long getDefaultLobLength () {
179
- return Integer . MAX_VALUE ;
180
+ return Length . LONG32 ;
180
181
}
181
182
182
183
private static boolean isAnsiNull (DialectResolutionInfo info ) {
You can’t perform that action at this time.
0 commit comments