Skip to content

HHH-19226 remove support for sql version's older than 2016 #10015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@
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.
* <p>
* Please refer to the
* <a href="https://learn.microsoft.com/en-us/sql/t-sql/language-reference">SQL Server documentation</a>.
*
* @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
Expand Down Expand Up @@ -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();
Expand Down
Loading