diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/SQLServer2012DialectTestCase.java b/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/SQLServer2012DialectTestCase.java similarity index 89% rename from hibernate-core/src/test/java/org/hibernate/orm/test/dialect/SQLServer2012DialectTestCase.java rename to hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/SQLServer2012DialectTestCase.java index 54d1763cfec0..521218a63bdc 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/SQLServer2012DialectTestCase.java +++ b/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/SQLServer2012DialectTestCase.java @@ -2,12 +2,12 @@ * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ -package org.hibernate.orm.test.dialect; +package org.hibernate.community.dialect; import java.util.Locale; import org.hibernate.dialect.DatabaseVersion; -import org.hibernate.dialect.SQLServerDialect; +import org.hibernate.dialect.Dialect; import org.hibernate.query.spi.Limit; import org.junit.After; @@ -20,16 +20,16 @@ import static org.junit.Assert.assertEquals; /** - * Tests the Limit/Offset handler for {@link SQLServerDialect, v11}. + * Tests the Limit/Offset handler for SQLServerDialect. * * @author Chris Cranford */ public class SQLServer2012DialectTestCase extends BaseUnitTestCase { - private SQLServerDialect dialect; + private Dialect dialect; @Before public void setup() { - dialect = new SQLServerDialect( DatabaseVersion.make( 11 ) ); + dialect = new SQLServerLegacyDialect( DatabaseVersion.make( 11 ) ); } @After diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java index 882d0e0783d3..dbb86c2b61ae 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java @@ -129,7 +129,7 @@ import static org.hibernate.type.descriptor.DateTimeUtils.appendAsTimestampWithMillis; /** - * A dialect for Microsoft SQL Server 2012 and above. + * A dialect for Microsoft SQL Server 2016 and above. *
* Please refer to the * SQL Server documentation. @@ -137,7 +137,7 @@ * @author Gavin King */ public class SQLServerDialect extends AbstractTransactSQLDialect { - private final static DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 11, 0 ); + private final static DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 13, 0 ); /** * NOTE : 2100 is the documented limit supposedly - but in my testing, sending @@ -445,20 +445,19 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio functionFactory.windowFunctions(); functionFactory.inverseDistributionOrderedSetAggregates_windowEmulation(); functionFactory.hypotheticalOrderedSetAggregates_windowEmulation(); - if ( getVersion().isSameOrAfter( 13 ) ) { - functionFactory.jsonValue_sqlserver(); - functionFactory.jsonQuery_sqlserver(); - functionFactory.jsonExists_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonObject_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonArray_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonSet_sqlserver(); - functionFactory.jsonRemove_sqlserver(); - functionFactory.jsonReplace_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonInsert_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonArrayAppend_sqlserver( getVersion().isSameOrAfter( 16 ) ); - functionFactory.jsonArrayInsert_sqlserver(); - functionFactory.jsonTable_sqlserver(); - } + functionFactory.jsonValue_sqlserver(); + functionFactory.jsonQuery_sqlserver(); + functionFactory.jsonExists_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonObject_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonArray_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonSet_sqlserver(); + functionFactory.jsonRemove_sqlserver(); + functionFactory.jsonReplace_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonInsert_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonArrayAppend_sqlserver( getVersion().isSameOrAfter( 16 ) ); + functionFactory.jsonArrayInsert_sqlserver(); + functionFactory.jsonTable_sqlserver(); + functionFactory.xmlelement_sqlserver(); functionFactory.xmlcomment_sqlserver(); functionFactory.xmlforest_sqlserver();