diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index c2d328eaba0..a09d2ca5f1a 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -109,6 +109,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6391](https://github.com/apache/incubator-seata/pull/6091)] forbid duplicate registration of TCC resources
- [[#6393](https://github.com/apache/incubator-seata/pull/6393)] determine the version before sync metadata and add retry mechanism
- [[#6387](https://github.com/apache/incubator-seata/pull/6387)] optimize tcc use compatible
+- [[#6402](https://github.com/apache/incubator-seata/pull/6402)] optimize rm-datasource use compatible
### refactor:
- [[#6269](https://github.com/apache/incubator-seata/pull/6269)] standardize Seata Exception
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index a6626c840df..ea314781090 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -113,6 +113,7 @@
- [[#6391](https://github.com/apache/incubator-seata/pull/6091)] 禁止重复注册TCC资源
- [[#6393](https://github.com/apache/incubator-seata/pull/6393)] 元数据同步前判断版本,并增加重试功能
- [[#6387](https://github.com/apache/incubator-seata/pull/6387)] 优化tcc使用兼容
+- [[#6402](https://github.com/apache/incubator-seata/pull/6402)] 优化rm-datasource向下兼容
### refactor:
diff --git a/compatible/pom.xml b/compatible/pom.xml
index b4e49933736..cd0972386f3 100644
--- a/compatible/pom.xml
+++ b/compatible/pom.xml
@@ -33,6 +33,12 @@
${java.version}
UTF-8
UTF-8
+
+ 4.11.0
+ 1.2.7
+ 5.1.42
+ 2.7.2
+ 3.12.2
@@ -57,12 +63,12 @@
org.apache.seata
- seata-metrics-api
+ seata-sqlparser-druid
${project.version}
org.apache.seata
- seata-sqlparser-druid
+ seata-metrics-api
${project.version}
@@ -125,7 +131,43 @@
seata-tcc
${project.version}
+
+ com.alibaba
+ druid
+ provided
+ ${druid.version}
+
+
+ org.mockito
+ mockito-core
+ ${mockito.version}
+ test
+
+
+ org.mockito
+ mockito-inline
+ ${mockito.version}
+
+
+ org.assertj
+ assertj-core
+ ${assertj-core.version}
+ test
+
+
+ mysql
+ mysql-connector-java
+ ${mysql.version}
+ test
+
+
+ org.mariadb.jdbc
+ mariadb-java-client
+ ${mariadb.version}
+ test
+
+
diff --git a/compatible/src/main/java/io/seata/rm/datasource/DataSourceProxy.java b/compatible/src/main/java/io/seata/rm/datasource/DataSourceProxy.java
index ad6188e06f5..7304caf1f1f 100644
--- a/compatible/src/main/java/io/seata/rm/datasource/DataSourceProxy.java
+++ b/compatible/src/main/java/io/seata/rm/datasource/DataSourceProxy.java
@@ -16,19 +16,87 @@
*/
package io.seata.rm.datasource;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
import javax.sql.DataSource;
+import org.apache.seata.core.model.BranchType;
+import org.apache.seata.rm.datasource.SeataDataSourceProxy;
/**
* The type Data source proxy.
*
*/
-public class DataSourceProxy extends org.apache.seata.rm.datasource.DataSourceProxy {
+public class DataSourceProxy implements SeataDataSourceProxy {
+ private final org.apache.seata.rm.datasource.DataSourceProxy dataSourceProxy;
public DataSourceProxy(DataSource targetDataSource) {
- super(targetDataSource);
+ this.dataSourceProxy = new org.apache.seata.rm.datasource.DataSourceProxy(targetDataSource);
}
public DataSourceProxy(DataSource targetDataSource, String resourceGroupId) {
- super(targetDataSource, resourceGroupId);
+ this.dataSourceProxy = new org.apache.seata.rm.datasource.DataSourceProxy(targetDataSource, resourceGroupId);
}
+
+ @Override
+ public DataSource getTargetDataSource() {
+ return dataSourceProxy.getTargetDataSource();
+ }
+
+ @Override
+ public BranchType getBranchType() {
+ return dataSourceProxy.getBranchType();
+ }
+
+ @Override
+ public Connection getConnection() throws SQLException {
+ return dataSourceProxy.getConnection();
+ }
+
+ @Override
+ public Connection getConnection(String username, String password) throws SQLException {
+ return dataSourceProxy.getConnection(username, password);
+ }
+
+ @Override
+ public T unwrap(Class iface) throws SQLException {
+ return dataSourceProxy.unwrap(iface);
+ }
+
+ @Override
+ public boolean isWrapperFor(Class> iface) throws SQLException {
+ return dataSourceProxy.isWrapperFor(iface);
+ }
+
+ @Override
+ public PrintWriter getLogWriter() throws SQLException {
+ return dataSourceProxy.getLogWriter();
+ }
+
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException {
+ dataSourceProxy.setLogWriter(out);
+ }
+
+ @Override
+ public void setLoginTimeout(int seconds) throws SQLException {
+ dataSourceProxy.setLoginTimeout(seconds);
+ }
+
+ @Override
+ public int getLoginTimeout() throws SQLException {
+ return dataSourceProxy.getLoginTimeout();
+ }
+
+ @Override
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ return dataSourceProxy.getParentLogger();
+ }
+
+ public String getResourceId() {
+ return dataSourceProxy.getResourceId();
+ }
+
}
diff --git a/compatible/src/main/java/io/seata/rm/datasource/undo/UndoExecutorHolder.java b/compatible/src/main/java/io/seata/rm/datasource/undo/UndoExecutorHolder.java
deleted file mode 100644
index e8abfc206c2..00000000000
--- a/compatible/src/main/java/io/seata/rm/datasource/undo/UndoExecutorHolder.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.rm.datasource.undo;
-
-
-/**
- * The Type UndoExecutorHolder
- *
- */
-public interface UndoExecutorHolder extends org.apache.seata.rm.datasource.undo.UndoExecutorHolder {
-}
diff --git a/compatible/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java b/compatible/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java
deleted file mode 100644
index 502b15f737b..00000000000
--- a/compatible/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.rm.datasource.undo;
-
-
-/**
- * The type Undo log manager.
- *
- */
-public interface UndoLogManager extends org.apache.seata.rm.datasource.undo.UndoLogManager {
-}
diff --git a/compatible/src/main/java/io/seata/rm/datasource/xa/DataSourceProxyXA.java b/compatible/src/main/java/io/seata/rm/datasource/xa/DataSourceProxyXA.java
index c90c515e9fa..ba10e9fa8c9 100644
--- a/compatible/src/main/java/io/seata/rm/datasource/xa/DataSourceProxyXA.java
+++ b/compatible/src/main/java/io/seata/rm/datasource/xa/DataSourceProxyXA.java
@@ -16,19 +16,83 @@
*/
package io.seata.rm.datasource.xa;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
import javax.sql.DataSource;
+import org.apache.seata.core.model.BranchType;
+import org.apache.seata.rm.datasource.SeataDataSourceProxy;
/**
* DataSource proxy for XA mode.
*
*/
-public class DataSourceProxyXA extends org.apache.seata.rm.datasource.xa.DataSourceProxyXA {
+public class DataSourceProxyXA implements SeataDataSourceProxy {
+
+ private final org.apache.seata.rm.datasource.xa.DataSourceProxyXA dataSourceProxyXA;
public DataSourceProxyXA(DataSource dataSource) {
- super(dataSource);
+ this.dataSourceProxyXA = new org.apache.seata.rm.datasource.xa.DataSourceProxyXA(dataSource);
}
public DataSourceProxyXA(DataSource dataSource, String resourceGroupId) {
- super(dataSource, resourceGroupId);
+ this.dataSourceProxyXA = new org.apache.seata.rm.datasource.xa.DataSourceProxyXA(dataSource, resourceGroupId);
+ }
+
+ @Override
+ public DataSource getTargetDataSource() {
+ return dataSourceProxyXA.getTargetDataSource();
+ }
+
+ @Override
+ public BranchType getBranchType() {
+ return dataSourceProxyXA.getBranchType();
+ }
+
+ @Override
+ public Connection getConnection() throws SQLException {
+ return dataSourceProxyXA.getConnection();
+ }
+
+ @Override
+ public Connection getConnection(String username, String password) throws SQLException {
+ return dataSourceProxyXA.getConnection(username, password);
+ }
+
+ @Override
+ public T unwrap(Class iface) throws SQLException {
+ return dataSourceProxyXA.unwrap(iface);
+ }
+
+ @Override
+ public boolean isWrapperFor(Class> iface) throws SQLException {
+ return dataSourceProxyXA.isWrapperFor(iface);
+ }
+
+ @Override
+ public PrintWriter getLogWriter() throws SQLException {
+ return dataSourceProxyXA.getLogWriter();
+ }
+
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException {
+ dataSourceProxyXA.setLogWriter(out);
+ }
+
+ @Override
+ public void setLoginTimeout(int seconds) throws SQLException {
+ dataSourceProxyXA.setLoginTimeout(seconds);
+ }
+
+ @Override
+ public int getLoginTimeout() throws SQLException {
+ return dataSourceProxyXA.getLoginTimeout();
+ }
+
+ @Override
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ return dataSourceProxyXA.getParentLogger();
}
}
diff --git a/compatible/src/main/java/io/seata/sqlparser/EscapeHandler.java b/compatible/src/main/java/io/seata/sqlparser/EscapeHandler.java
deleted file mode 100644
index 2976b0daf20..00000000000
--- a/compatible/src/main/java/io/seata/sqlparser/EscapeHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.sqlparser;
-
-
-/**
- * The interface Keyword checker.
- *
- */
-public interface EscapeHandler extends org.apache.seata.sqlparser.EscapeHandler {
-}
diff --git a/compatible/src/main/java/io/seata/sqlparser/SQLRecognizerFactory.java b/compatible/src/main/java/io/seata/sqlparser/SQLRecognizerFactory.java
deleted file mode 100644
index 63d6a43b74c..00000000000
--- a/compatible/src/main/java/io/seata/sqlparser/SQLRecognizerFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.sqlparser;
-
-
-public interface SQLRecognizerFactory extends org.apache.seata.sqlparser.SQLRecognizerFactory {
-}
diff --git a/compatible/src/main/java/io/seata/sqlparser/druid/SQLOperateRecognizerHolder.java b/compatible/src/main/java/io/seata/sqlparser/druid/SQLOperateRecognizerHolder.java
deleted file mode 100644
index bfe8a96c772..00000000000
--- a/compatible/src/main/java/io/seata/sqlparser/druid/SQLOperateRecognizerHolder.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.sqlparser.druid;
-
-
-/**
- * The interface SQLOperateRecognizerHolder
- *
- */
-public interface SQLOperateRecognizerHolder extends org.apache.seata.sqlparser.druid.SQLOperateRecognizerHolder {
-
-}
diff --git a/compatible/src/main/java/io/seata/sqlparser/struct/TableMetaCache.java b/compatible/src/main/java/io/seata/sqlparser/struct/TableMetaCache.java
deleted file mode 100644
index bcc2c0e50e3..00000000000
--- a/compatible/src/main/java/io/seata/sqlparser/struct/TableMetaCache.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.sqlparser.struct;
-
-
-/**
- * The type Table meta cache.
- *
- */
-public interface TableMetaCache extends org.apache.seata.sqlparser.struct.TableMetaCache {
-
-}
diff --git a/compatible/src/main/java/io/seata/sqlparser/util/DbTypeParser.java b/compatible/src/main/java/io/seata/sqlparser/util/DbTypeParser.java
deleted file mode 100644
index 73b85f9e403..00000000000
--- a/compatible/src/main/java/io/seata/sqlparser/util/DbTypeParser.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.seata.sqlparser.util;
-
-
-public interface DbTypeParser extends org.apache.seata.sqlparser.util.DbTypeParser {
-}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/DataSourceProxyTest.java b/compatible/src/test/java/io/seata/rm/datasource/DataSourceProxyTest.java
new file mode 100644
index 00000000000..0460ebeff91
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/DataSourceProxyTest.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource;
+
+import java.sql.Connection;
+
+import javax.sql.DataSource;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import io.seata.rm.datasource.mock.MockDataSource;
+import io.seata.rm.datasource.mock.MockDriver;
+import org.apache.seata.rm.datasource.undo.UndoLogManagerFactory;
+import org.apache.seata.rm.datasource.undo.mysql.MySQLUndoLogManager;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockito.MockedStatic;
+import org.mockito.Mockito;
+
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+
+public class DataSourceProxyTest {
+
+ @Test
+ public void test_constructor() {
+ DataSource dataSource = new MockDataSource();
+ DataSourceProxy dataSourceProxy = new DataSourceProxy(dataSource);
+ Assertions.assertEquals(dataSourceProxy.getTargetDataSource(), dataSource);
+
+ DataSourceProxy dataSourceProxy2 = new DataSourceProxy(dataSourceProxy);
+ Assertions.assertEquals(dataSourceProxy2.getTargetDataSource(), dataSource);
+ }
+
+ @Test
+ public void testNotSupportDb() {
+ final MockDriver mockDriver = new MockDriver();
+ final String username = "username";
+ final String jdbcUrl = "jdbc:mock:xxx";
+
+ // create data source
+ final DruidDataSource dataSource = new DruidDataSource();
+ dataSource.setUrl(jdbcUrl);
+ dataSource.setDriver(mockDriver);
+ dataSource.setUsername(username);
+ dataSource.setPassword("password");
+
+ Throwable throwable = Assertions.assertThrows(IllegalStateException.class, () -> new DataSourceProxy(dataSource));
+ assertThat(throwable).hasMessageContaining("AT mode don't support the the dbtype");
+ }
+
+
+ @Test
+ public void testUndologTableNotExist() {
+ DataSource dataSource = new MockDataSource();
+
+ MockedStatic undoLogManagerFactoryMockedStatic = Mockito.mockStatic(UndoLogManagerFactory.class);
+
+ MySQLUndoLogManager mysqlUndoLogManager = mock(MySQLUndoLogManager.class);
+ undoLogManagerFactoryMockedStatic.when(()->UndoLogManagerFactory.getUndoLogManager(anyString()))
+ .thenReturn(mysqlUndoLogManager);
+
+ doReturn(false).when(mysqlUndoLogManager).hasUndoLogTable(any(Connection.class));
+
+ Throwable throwable = Assertions.assertThrows(IllegalStateException.class, () -> new DataSourceProxy(dataSource));
+ undoLogManagerFactoryMockedStatic.close();
+
+ assertThat(throwable).hasMessageContaining("table not exist");
+ }
+
+ // to skip the db & undolog table check
+ public static DataSourceProxy getDataSourceProxy(DataSource dataSource) {
+ try (MockedStatic undoLogManagerFactoryMockedStatic = Mockito.mockStatic(UndoLogManagerFactory.class)) {
+ MySQLUndoLogManager mysqlUndoLogManager = mock(MySQLUndoLogManager.class);
+ undoLogManagerFactoryMockedStatic.when(() -> UndoLogManagerFactory.getUndoLogManager(anyString())).thenReturn(mysqlUndoLogManager);
+
+ doReturn(true).when(mysqlUndoLogManager).hasUndoLogTable(any(Connection.class));
+
+ // create data source proxy
+ return new DataSourceProxy(dataSource);
+ }
+ }
+}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/mock/MockBlob.java b/compatible/src/test/java/io/seata/rm/datasource/mock/MockBlob.java
new file mode 100644
index 00000000000..7921e495bd3
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/mock/MockBlob.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource.mock;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.sql.Blob;
+import java.sql.SQLException;
+
+
+public class MockBlob implements Blob {
+
+ public MockBlob() {
+ }
+
+ @Override
+ public long length() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public byte[] getBytes(long pos, int length) throws SQLException {
+ return new byte[0];
+ }
+
+ @Override
+ public InputStream getBinaryStream() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public long position(byte[] pattern, long start) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public long position(Blob pattern, long start) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int setBytes(long pos, byte[] bytes) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public OutputStream setBinaryStream(long pos) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public void truncate(long len) throws SQLException {
+
+ }
+
+ @Override
+ public void free() throws SQLException {
+
+ }
+
+ @Override
+ public InputStream getBinaryStream(long pos, long length) throws SQLException {
+ return null;
+ }
+}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/mock/MockClob.java b/compatible/src/test/java/io/seata/rm/datasource/mock/MockClob.java
new file mode 100644
index 00000000000..c5231d1e427
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/mock/MockClob.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource.mock;
+
+import java.io.ByteArrayInputStream;
+import java.io.CharArrayReader;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.sql.Clob;
+import java.sql.SQLException;
+
+
+public class MockClob implements Clob {
+
+ @Override
+ public long length() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public String getSubString(long pos, int length) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public Reader getCharacterStream() throws SQLException {
+ return new CharArrayReader(new char[0]);
+ }
+
+ @Override
+ public InputStream getAsciiStream() throws SQLException {
+ return new ByteArrayInputStream(new byte[0]);
+ }
+
+ @Override
+ public long position(String searchstr, long start) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public long position(Clob searchstr, long start) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int setString(long pos, String str) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int setString(long pos, String str, int offset, int len) throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public OutputStream setAsciiStream(long pos) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public Writer setCharacterStream(long pos) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public void truncate(long len) throws SQLException {
+
+ }
+
+ @Override
+ public void free() throws SQLException {
+
+ }
+
+ @Override
+ public Reader getCharacterStream(long pos, long length) throws SQLException {
+ return null;
+ }
+}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/mock/MockConnection.java b/compatible/src/test/java/io/seata/rm/datasource/mock/MockConnection.java
new file mode 100644
index 00000000000..e87db43cff1
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/mock/MockConnection.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource.mock;
+
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.sql.Savepoint;
+import java.util.Properties;
+
+/**
+ * Mock connection
+ */
+public class MockConnection extends com.alibaba.druid.mock.MockConnection {
+
+ private MockDriver mockDriver;
+
+ /**
+ * Instantiate a new MockConnection
+ * @param driver
+ * @param url
+ * @param connectProperties
+ */
+ public MockConnection(MockDriver driver, String url, Properties connectProperties) {
+ super(driver, url, connectProperties);
+ this.mockDriver = driver;
+ }
+
+ @Override
+ public DatabaseMetaData getMetaData() throws SQLException {
+ return new MockDatabaseMetaData(this);
+ }
+
+ @Override
+ public void releaseSavepoint(Savepoint savepoint) throws SQLException {
+
+ }
+
+ @Override
+ public void rollback() {
+
+ }
+
+ @Override
+ public void rollback(Savepoint savepoint) {
+
+ }
+
+ @Override
+ public MockDriver getDriver() {
+ return mockDriver;
+ }
+
+ @Override
+ public String getSchema() {
+ return null;
+ }
+}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/mock/MockDataSource.java b/compatible/src/test/java/io/seata/rm/datasource/mock/MockDataSource.java
new file mode 100644
index 00000000000..7854c43b0eb
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/mock/MockDataSource.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource.mock;
+
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
+
+import javax.sql.DataSource;
+
+public class MockDataSource implements DataSource {
+ @Override
+ public Connection getConnection() throws SQLException {
+ return new MockConnection(new MockDriver(), "jdbc:mysql://127.0.0.1:3306/seata?rewriteBatchedStatements=true", null);
+ }
+
+ @Override
+ public Connection getConnection(String username, String password) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public T unwrap(Class iface) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public boolean isWrapperFor(Class> iface) throws SQLException {
+ return false;
+ }
+
+ @Override
+ public PrintWriter getLogWriter() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException {
+
+ }
+
+ @Override
+ public void setLoginTimeout(int seconds) throws SQLException {
+
+ }
+
+ @Override
+ public int getLoginTimeout() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ return null;
+ }
+}
diff --git a/compatible/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java b/compatible/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java
new file mode 100644
index 00000000000..a4abb1489ef
--- /dev/null
+++ b/compatible/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java
@@ -0,0 +1,1013 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.seata.rm.datasource.mock;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.RowIdLifetime;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ */
+public class MockDatabaseMetaData implements DatabaseMetaData {
+
+ protected MockConnection connection;
+
+ private static List columnMetaColumnLabels = Arrays.asList(
+ "TABLE_CAT",
+ "TABLE_SCHEM",
+ "TABLE_NAME",
+ "COLUMN_NAME",
+ "DATA_TYPE",
+ "TYPE_NAME",
+ "COLUMN_SIZE",
+ "DECIMAL_DIGITS",
+ "NUM_PREC_RADIX",
+ "NULLABLE",
+ "REMARKS",
+ "COLUMN_DEF",
+ "SQL_DATA_TYPE",
+ "SQL_DATETIME_SUB",
+ "CHAR_OCTET_LENGTH",
+ "ORDINAL_POSITION",
+ "IS_NULLABLE",
+ "IS_AUTOINCREMENT"
+ );
+
+ private static List indexMetaColumnLabels = Arrays.asList(
+ "INDEX_NAME",
+ "COLUMN_NAME",
+ "NON_UNIQUE",
+ "INDEX_QUALIFIER",
+ "TYPE",
+ "ORDINAL_POSITION",
+ "ASC_OR_DESC",
+ "CARDINALITY"
+ );
+
+ private static List pkMetaColumnLabels = Arrays.asList(
+ "PK_NAME"
+ );
+
+ private static List mockColumnsMetasLabels = Arrays.asList(
+ "SCOPE",
+ "COLUMN_NAME",
+ "DATA_TYPE",
+ "TYPE_NAME",
+ "COLUMN_SIZE",
+ "BUFFER_LENGTH",
+ "DECIMAL_DIGITS",
+ "PSEUDO_COLUMN"
+ );
+
+ private Object[][] columnsMetasReturnValue;
+
+ private Object[][] indexMetasReturnValue;
+
+ private Object[][] pkMetasReturnValue;
+
+ private Object[][] mockColumnsMetasReturnValue;
+
+ /**
+ * Instantiate a new MockDatabaseMetaData
+ */
+ public MockDatabaseMetaData(MockConnection connection) {
+ this.connection = connection;
+ this.columnsMetasReturnValue = connection.getDriver().getMockColumnsMetasReturnValue();
+ this.indexMetasReturnValue = connection.getDriver().getMockIndexMetasReturnValue();
+ this.pkMetasReturnValue = connection.getDriver().getMockPkMetasReturnValue();
+ this.mockColumnsMetasReturnValue = connection.getDriver().getMockOnUpdateColumnsReturnValue();
+ }
+
+ @Override
+ public boolean allProceduresAreCallable() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean allTablesAreSelectable() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public String getURL() throws SQLException {
+ return this.connection.getUrl();
+ }
+
+ @Override
+ public String getUserName() throws SQLException {
+ return this.connection.getConnectProperties().getProperty("user");
+ }
+
+ @Override
+ public boolean isReadOnly() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean nullsAreSortedHigh() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean nullsAreSortedLow() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean nullsAreSortedAtStart() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean nullsAreSortedAtEnd() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public String getDatabaseProductName() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getDatabaseProductVersion() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getDriverName() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getDriverVersion() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public int getDriverMajorVersion() {
+ return 0;
+ }
+
+ @Override
+ public int getDriverMinorVersion() {
+ return 0;
+ }
+
+ @Override
+ public boolean usesLocalFiles() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean usesLocalFilePerTable() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsMixedCaseIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesUpperCaseIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesLowerCaseIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesMixedCaseIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public String getIdentifierQuoteString() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getSQLKeywords() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getNumericFunctions() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getStringFunctions() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getSystemFunctions() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getTimeDateFunctions() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getSearchStringEscape() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getExtraNameCharacters() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public boolean supportsAlterTableWithAddColumn() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsAlterTableWithDropColumn() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsColumnAliasing() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean nullPlusNonNullIsNull() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsConvert() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsConvert(int fromType, int toType) throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsTableCorrelationNames() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsDifferentTableCorrelationNames() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsExpressionsInOrderBy() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOrderByUnrelated() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsGroupBy() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsGroupByUnrelated() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsGroupByBeyondSelect() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsLikeEscapeClause() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsMultipleResultSets() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsMultipleTransactions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsNonNullableColumns() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsMinimumSQLGrammar() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCoreSQLGrammar() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsExtendedSQLGrammar() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsANSI92EntryLevelSQL() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsANSI92IntermediateSQL() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsANSI92FullSQL() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsIntegrityEnhancementFacility() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOuterJoins() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsFullOuterJoins() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsLimitedOuterJoins() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public String getSchemaTerm() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getProcedureTerm() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public String getCatalogTerm() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public boolean isCatalogAtStart() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public String getCatalogSeparator() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public boolean supportsSchemasInDataManipulation() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSchemasInProcedureCalls() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSchemasInTableDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSchemasInIndexDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCatalogsInDataManipulation() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCatalogsInProcedureCalls() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCatalogsInTableDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsPositionedDelete() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsPositionedUpdate() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSelectForUpdate() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsStoredProcedures() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSubqueriesInComparisons() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSubqueriesInExists() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSubqueriesInIns() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsSubqueriesInQuantifieds() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsCorrelatedSubqueries() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsUnion() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsUnionAll() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public int getMaxBinaryLiteralLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxCharLiteralLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnsInGroupBy() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnsInIndex() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnsInOrderBy() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnsInSelect() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxColumnsInTable() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxConnections() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxCursorNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxIndexLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxSchemaNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxProcedureNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxCatalogNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxRowSize() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public int getMaxStatementLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxStatements() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxTableNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxTablesInSelect() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getMaxUserNameLength() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public int getDefaultTransactionIsolation() throws SQLException {
+ return 0;
+ }
+
+ @Override
+ public boolean supportsTransactions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsTransactionIsolationLevel(int level) throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
+ return false;
+ }
+
+ @Override
+ public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
+ throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern,
+ String columnNamePattern) throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
+ throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getSchemas() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getCatalogs() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getTableTypes() throws SQLException {
+ return null;
+ }
+
+ @Override
+ public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
+ throws SQLException {
+ List