File tree Expand file tree Collapse file tree 2 files changed +41
-4
lines changed
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ public Dialect resolveDialect(DialectResolutionInfo info) {
480
480
SQLSERVER {
481
481
@ Override
482
482
public Class <? extends Dialect > latestDialect () {
483
- return SQLServer2012Dialect .class ;
483
+ return SQLServer2016Dialect .class ;
484
484
}
485
485
486
486
@ Override
@@ -501,16 +501,20 @@ public Dialect resolveDialect(DialectResolutionInfo info) {
501
501
return new SQLServer2008Dialect ();
502
502
}
503
503
case 11 :
504
- case 12 :
505
- case 13 : {
504
+ case 12 : {
506
505
return new SQLServer2012Dialect ();
507
506
}
507
+ case 13 :
508
+ case 14 :
509
+ case 15 : {
510
+ return new SQLServer2016Dialect ();
511
+ }
508
512
default : {
509
513
if ( majorVersion < 8 ) {
510
514
return new SQLServerDialect ();
511
515
}
512
516
else {
513
- // assume `majorVersion > 13 `
517
+ // assume `majorVersion > 15 `
514
518
return latestDialectInstance ( this );
515
519
}
516
520
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Hibernate, Relational Persistence for Idiomatic Java
3
+ *
4
+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5
+ * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
6
+ */
7
+ package org .hibernate .dialect ;
8
+
9
+ /**
10
+ * Microsoft SQL Server 2016 Dialect
11
+ */
12
+ public class SQLServer2016Dialect extends SQLServer2012Dialect {
13
+
14
+ @ Override
15
+ public boolean supportsIfExistsBeforeTableName () {
16
+ return true ;
17
+ }
18
+
19
+ @ Override
20
+ public boolean supportsIfExistsBeforeConstraintName () {
21
+ return true ;
22
+ }
23
+
24
+ @ Override
25
+ public String getDropSequenceString (String sequenceName ) {
26
+ return "drop sequence if exists " + sequenceName ;
27
+ }
28
+
29
+ @ Override
30
+ public String [] getDropSchemaCommand (String schemaName ) {
31
+ return new String [] {"drop schema if exists " + schemaName };
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments