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 1919import java .util .Map ;
2020import java .util .TimeZone ;
2121
22+ import org .hibernate .Length ;
2223import org .hibernate .LockMode ;
2324import org .hibernate .LockOptions ;
2425import org .hibernate .PessimisticLockException ;
@@ -280,7 +281,7 @@ public int getMaxVarcharCapacity() {
280281 @ Override
281282 public int getMaxVarbinaryLength () {
282283 //postgres has no varbinary-like type
283- return Integer . MAX_VALUE ;
284+ return Length . LONG32 ;
284285 }
285286
286287 @ Override
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ public long getDefaultLobLength() {
289289 // this is essentially the only legal length for
290290 // a "lob" in SQL Server, i.e. the value of MAX
291291 // (caveat: for NVARCHAR it is half this value)
292- return Integer . MAX_VALUE ;
292+ return Length . LONG32 ;
293293 }
294294
295295 @ Override
Original file line number Diff line number Diff line change 99
1010import java .util .Map ;
1111
12+ import org .hibernate .Length ;
1213import org .hibernate .LockOptions ;
1314import org .hibernate .boot .model .FunctionContributions ;
1415import org .hibernate .community .dialect .identity .SybaseAnywhereIdentityColumnSupport ;
@@ -103,7 +104,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
103104
104105 @ Override
105106 public int getMaxVarcharLength () {
106- return 32_767 ;
107+ return Length . LONG16 ;
107108 }
108109
109110 @ Override
Original file line number Diff line number Diff line change @@ -4760,7 +4760,7 @@ public SizeStrategy getSizeStrategy() {
47604760 */
47614761 public int getMaxVarcharLength () {
47624762 //the longest possible length of a Java string
4763- return Integer . MAX_VALUE ;
4763+ return Length . LONG32 ;
47644764 }
47654765
47664766 /**
Original file line number Diff line number Diff line change 1717import java .util .Date ;
1818import java .util .TimeZone ;
1919
20+ import org .hibernate .Length ;
2021import org .hibernate .LockOptions ;
2122import org .hibernate .PessimisticLockException ;
2223import org .hibernate .boot .model .FunctionContributions ;
@@ -534,7 +535,7 @@ public SizeStrategy getSizeStrategy() {
534535
535536 @ Override
536537 public long getDefaultLobLength () {
537- return Integer . MAX_VALUE ;
538+ return Length . LONG32 ;
538539 }
539540
540541 @ Override
Original file line number Diff line number Diff line change 1717import java .util .regex .Matcher ;
1818import java .util .regex .Pattern ;
1919
20+ import org .hibernate .Length ;
2021import org .hibernate .QueryTimeoutException ;
2122import org .hibernate .boot .model .FunctionContributions ;
2223import org .hibernate .boot .model .TypeContributions ;
@@ -390,13 +391,13 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
390391 @ Override
391392 public int getMaxVarcharLength () {
392393 //with MAX_STRING_SIZE=EXTENDED, changes to 32_767
393- return extended ? 32_767 : 4000 ;
394+ return extended ? Length . LONG16 : 4000 ;
394395 }
395396
396397 @ Override
397398 public int getMaxVarbinaryLength () {
398399 //with MAX_STRING_SIZE=EXTENDED, changes to 32_767
399- return extended ? 32_767 : 2000 ;
400+ return extended ? Length . LONG16 : 2000 ;
400401 }
401402
402403 @ Override
Original file line number Diff line number Diff line change 1919import java .util .Map ;
2020import java .util .TimeZone ;
2121
22+ import org .hibernate .Length ;
2223import org .hibernate .LockMode ;
2324import org .hibernate .LockOptions ;
2425import org .hibernate .PessimisticLockException ;
@@ -298,7 +299,7 @@ public int getMaxVarcharCapacity() {
298299 @ Override
299300 public int getMaxVarbinaryLength () {
300301 //postgres has no varbinary-like type
301- return Integer . MAX_VALUE ;
302+ return Length . LONG32 ;
302303 }
303304
304305 @ Override
Original file line number Diff line number Diff line change 1616import java .util .List ;
1717import java .util .TimeZone ;
1818
19+ import org .hibernate .Length ;
1920import org .hibernate .LockMode ;
2021import org .hibernate .LockOptions ;
2122import org .hibernate .QueryTimeoutException ;
@@ -298,7 +299,7 @@ public long getDefaultLobLength() {
298299 // this is essentially the only legal length for
299300 // a "lob" in SQL Server, i.e. the value of MAX
300301 // (caveat: for NVARCHAR it is half this value)
301- return Integer . MAX_VALUE ;
302+ return Length . LONG32 ;
302303 }
303304
304305 @ Override
Original file line number Diff line number Diff line change 1111import java .sql .SQLException ;
1212import java .sql .Types ;
1313
14+ import org .hibernate .Length ;
1415import org .hibernate .LockMode ;
1516import org .hibernate .LockOptions ;
1617import org .hibernate .QueryTimeoutException ;
@@ -176,7 +177,7 @@ public int getMaxVarcharLength() {
176177
177178 @ Override
178179 public long getDefaultLobLength () {
179- return Integer . MAX_VALUE ;
180+ return Length . LONG32 ;
180181 }
181182
182183 private static boolean isAnsiNull (DialectResolutionInfo info ) {
You can’t perform that action at this time.
0 commit comments