Skip to content

Commit 5f3559f

Browse files
committed
Call statement support for SAP HANA
Issue: SPR-13381
1 parent 35e1eca commit 5f3559f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* based on the type of database being used.
3636
*
3737
* @author Thomas Risberg
38+
* @author Juergen Hoeller
3839
* @since 2.5
3940
*/
4041
public class CallMetaDataProviderFactory {
@@ -118,6 +119,9 @@ else if ("Sybase".equals(databaseProductName)) {
118119
else if ("Microsoft SQL Server".equals(databaseProductName)) {
119120
provider = new SqlServerCallMetaDataProvider((databaseMetaData));
120121
}
122+
else if ("HDB".equals(databaseProductName)) {
123+
provider = new HanaCallMetaDataProvider((databaseMetaData));
124+
}
121125
else {
122126
provider = new GenericCallMetaDataProvider(databaseMetaData);
123127
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2002-2015 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.jdbc.core.metadata;
18+
19+
import java.sql.DatabaseMetaData;
20+
import java.sql.SQLException;
21+
22+
/**
23+
* SAP HANA specific implementation for the {@link CallMetaDataProvider} interface.
24+
* This class is intended for internal use by the Simple JDBC classes.
25+
*
26+
* @author Subhobrata Dey
27+
* @author Juergen Hoeller
28+
* @since 4.2.1
29+
*/
30+
public class HanaCallMetaDataProvider extends GenericCallMetaDataProvider {
31+
32+
public HanaCallMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException {
33+
super(databaseMetaData);
34+
}
35+
36+
@Override
37+
public void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException {
38+
super.initializeWithMetaData(databaseMetaData);
39+
setStoresUpperCaseIdentifiers(false);
40+
}
41+
42+
}

0 commit comments

Comments
 (0)