未验证 提交 75461813 编写于 作者: L Liang Zhang 提交者: GitHub

Split SchemaMetaDataLoader to SchemaMetaDataLoader and TableMetaDataLoader (#8066)

* Remove useless SchemaMetaDataLoader.load with single data source

* Split SchemaMetaDataLoader to SchemaMetaDataLoader and TableMetaDataLoader

* Refactor ShardingSphereMetaDataLoader
上级 faa4ff60
......@@ -54,8 +54,8 @@ public final class EncryptMetaDataLoader implements ShardingSphereMetaDataLoader
}
@Override
public Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap, final DataNodes dataNodes,
final String tableName, final EncryptRule encryptRule, final ConfigurationProperties props) throws SQLException {
public Optional<PhysicalTableMetaData> load(final String tableName, final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap, final DataNodes dataNodes,
final EncryptRule encryptRule, final ConfigurationProperties props) throws SQLException {
return encryptRule.findEncryptTable(tableName).isPresent() ? PhysicalTableMetaDataLoader.load(dataSourceMap.values().iterator().next(), tableName, databaseType) : Optional.empty();
}
......
......@@ -107,8 +107,7 @@ public final class EncryptMetaDataLoaderTest {
public void assertLoadByExistedTable() throws SQLException {
EncryptRule rule = createEncryptRule();
EncryptMetaDataLoader loader = (EncryptMetaDataLoader) OrderedSPIRegistry.getRegisteredServices(Collections.singletonList(rule), ShardingSphereMetaDataLoader.class).get(rule);
Optional<PhysicalTableMetaData> actual = loader.load(
databaseType, Collections.singletonMap("logic_db", dataSource), new DataNodes(Collections.singletonList(rule)), TABLE_NAME, rule, props);
Optional<PhysicalTableMetaData> actual = loader.load(TABLE_NAME, databaseType, Collections.singletonMap("logic_db", dataSource), new DataNodes(Collections.singletonList(rule)), rule, props);
assertTrue(actual.isPresent());
assertThat(actual.get().getColumnMetaData(0).getName(), is("id"));
assertThat(actual.get().getColumnMetaData(1).getName(), is("pwd_cipher"));
......@@ -120,7 +119,7 @@ public final class EncryptMetaDataLoaderTest {
EncryptRule rule = createEncryptRule();
EncryptMetaDataLoader loader = new EncryptMetaDataLoader();
Optional<PhysicalTableMetaData> actual = loader.load(
databaseType, Collections.singletonMap("logic_db", dataSource), new DataNodes(Collections.singletonList(rule)), "not_existed_table", rule, props);
"not_existed_table", databaseType, Collections.singletonMap("logic_db", dataSource), new DataNodes(Collections.singletonList(rule)), rule, props);
assertFalse(actual.isPresent());
}
......
......@@ -64,15 +64,15 @@ public final class ShardingMetaDataLoader implements ShardingSphereMetaDataLoade
PhysicalSchemaMetaData result = new PhysicalSchemaMetaData(new HashMap<>(rule.getTableRules().size(), 1));
for (TableRule each : rule.getTableRules()) {
if (!excludedTableNames.contains(each.getLogicTable())) {
load(databaseType, dataSourceMap, dataNodes, each.getLogicTable(), rule, props).ifPresent(tableMetaData -> result.put(each.getLogicTable(), tableMetaData));
load(each.getLogicTable(), databaseType, dataSourceMap, dataNodes, rule, props).ifPresent(tableMetaData -> result.put(each.getLogicTable(), tableMetaData));
}
}
return result;
}
@Override
public Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap, final DataNodes dataNodes,
final String tableName, final ShardingRule rule, final ConfigurationProperties props) throws SQLException {
public Optional<PhysicalTableMetaData> load(final String tableName, final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap, final DataNodes dataNodes,
final ShardingRule rule, final ConfigurationProperties props) throws SQLException {
if (!rule.findTableRule(tableName).isPresent()) {
return Optional.empty();
}
......
......@@ -20,7 +20,6 @@ package org.apache.shardingsphere.infra.metadata.schema.loader;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.DefaultSchema;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNodes;
import org.apache.shardingsphere.infra.metadata.schema.loader.spi.ShardingSphereMetaDataDecorator;
......@@ -35,11 +34,9 @@ import org.apache.shardingsphere.infra.spi.ordered.OrderedSPIRegistry;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.TreeSet;
/**
......@@ -65,7 +62,7 @@ public final class SchemaMetaDataLoader {
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static PhysicalSchemaMetaData load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final Collection<ShardingSphereRule> rules, final ConfigurationProperties props) throws SQLException {
final Collection<ShardingSphereRule> rules, final ConfigurationProperties props) throws SQLException {
Collection<String> excludedTableNames = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
PhysicalSchemaMetaData result = new PhysicalSchemaMetaData();
for (Entry<ShardingSphereRule, ShardingSphereMetaDataLoader> entry : OrderedSPIRegistry.getRegisteredServices(rules, ShardingSphereMetaDataLoader.class).entrySet()) {
......@@ -80,60 +77,6 @@ public final class SchemaMetaDataLoader {
return result;
}
/**
* Load schema meta data.
*
* @param databaseType database type
* @param dataSource data source
* @param rules ShardingSphere rules
* @param props configuration properties
* @return schema meta data
* @throws SQLException SQL exception
*/
public static PhysicalSchemaMetaData load(final DatabaseType databaseType, final DataSource dataSource,
final Collection<ShardingSphereRule> rules, final ConfigurationProperties props) throws SQLException {
return load(databaseType, Collections.singletonMap(DefaultSchema.LOGIC_NAME, dataSource), rules, props);
}
/**
* Load schema meta data.
*
* @param databaseType database type
* @param dataSourceMap data source map
* @param rules ShardingSphere rules
* @param tableName table name
* @param props configuration properties
* @return schema meta data
* @throws SQLException SQL exception
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final Collection<ShardingSphereRule> rules, final String tableName, final ConfigurationProperties props) throws SQLException {
for (Entry<ShardingSphereRule, ShardingSphereMetaDataLoader> entry : OrderedSPIRegistry.getRegisteredServices(rules, ShardingSphereMetaDataLoader.class).entrySet()) {
Optional<PhysicalTableMetaData> result = entry.getValue().load(databaseType, dataSourceMap, new DataNodes(rules), tableName, entry.getKey(), props);
if (result.isPresent()) {
return Optional.of(decorate(rules, tableName, result.get()));
}
}
return Optional.empty();
}
/**
* Load schema meta data.
*
* @param databaseType database type
* @param dataSource data source
* @param rules ShardingSphere rules
* @param tableName table name
* @param props configuration properties
* @return schema meta data
* @throws SQLException SQL exception
*/
public static Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final DataSource dataSource,
final Collection<ShardingSphereRule> rules, final String tableName, final ConfigurationProperties props) throws SQLException {
return load(databaseType, Collections.singletonMap(DefaultSchema.LOGIC_NAME, dataSource), rules, tableName, props);
}
@SuppressWarnings({"unchecked", "rawtypes"})
private static void decorate(final Collection<ShardingSphereRule> rules, final PhysicalSchemaMetaData schemaMetaData) {
Map<String, PhysicalTableMetaData> tableMetaDataMap = new HashMap<>(schemaMetaData.getAllTableNames().size(), 1);
......@@ -145,14 +88,4 @@ public final class SchemaMetaDataLoader {
}
schemaMetaData.merge(new PhysicalSchemaMetaData(tableMetaDataMap));
}
@SuppressWarnings({"unchecked", "rawtypes"})
private static PhysicalTableMetaData decorate(final Collection<ShardingSphereRule> rules, final String tableName, final PhysicalTableMetaData tableMetaData) {
Map<ShardingSphereRule, ShardingSphereMetaDataDecorator> decorators = OrderedSPIRegistry.getRegisteredServices(rules, ShardingSphereMetaDataDecorator.class);
PhysicalTableMetaData result = null;
for (Entry<ShardingSphereRule, ShardingSphereMetaDataDecorator> entry : decorators.entrySet()) {
result = entry.getValue().decorate(tableName, null == result ? tableMetaData : result, entry.getKey());
}
return Optional.ofNullable(result).orElse(tableMetaData);
}
}
/*
* 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 org.apache.shardingsphere.infra.metadata.schema.loader;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.datanode.DataNodes;
import org.apache.shardingsphere.infra.metadata.schema.loader.spi.ShardingSphereMetaDataDecorator;
import org.apache.shardingsphere.infra.metadata.schema.loader.spi.ShardingSphereMetaDataLoader;
import org.apache.shardingsphere.infra.metadata.schema.model.physical.PhysicalTableMetaData;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.ordered.OrderedSPIRegistry;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
/**
* Table meta data loader.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TableMetaDataLoader {
static {
ShardingSphereServiceLoader.register(ShardingSphereMetaDataLoader.class);
ShardingSphereServiceLoader.register(ShardingSphereMetaDataDecorator.class);
}
/**
* Load table meta data.
*
* @param tableName table name
* @param databaseType database type
* @param dataSourceMap data source map
* @param rules ShardingSphere rules
* @param props configuration properties
* @return table meta data
* @throws SQLException SQL exception
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static Optional<PhysicalTableMetaData> load(final String tableName, final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final Collection<ShardingSphereRule> rules, final ConfigurationProperties props) throws SQLException {
for (Entry<ShardingSphereRule, ShardingSphereMetaDataLoader> entry : OrderedSPIRegistry.getRegisteredServices(rules, ShardingSphereMetaDataLoader.class).entrySet()) {
Optional<PhysicalTableMetaData> result = entry.getValue().load(tableName, databaseType, dataSourceMap, new DataNodes(rules), entry.getKey(), props);
if (result.isPresent()) {
return Optional.of(decorate(tableName, result.get(), rules));
}
}
return Optional.empty();
}
@SuppressWarnings({"unchecked", "rawtypes"})
private static PhysicalTableMetaData decorate(final String tableName, final PhysicalTableMetaData tableMetaData, final Collection<ShardingSphereRule> rules) {
Map<ShardingSphereRule, ShardingSphereMetaDataDecorator> decorators = OrderedSPIRegistry.getRegisteredServices(rules, ShardingSphereMetaDataDecorator.class);
PhysicalTableMetaData result = null;
for (Entry<ShardingSphereRule, ShardingSphereMetaDataDecorator> entry : decorators.entrySet()) {
result = entry.getValue().decorate(tableName, null == result ? tableMetaData : result, entry.getKey());
}
return Optional.ofNullable(result).orElse(tableMetaData);
}
}
......@@ -56,15 +56,15 @@ public interface ShardingSphereMetaDataLoader<T extends ShardingSphereRule> exte
/**
* Load table meta data.
*
* @param tableName table name
* @param databaseType database type
* @param dataSourceMap data source map
* @param dataNodes data nodes
* @param tableName table name
* @param rule rule
* @param props configuration properties
* @return meta data
* @throws SQLException SQL exception
*/
Optional<PhysicalTableMetaData> load(DatabaseType databaseType, Map<String, DataSource> dataSourceMap,
DataNodes dataNodes, String tableName, T rule, ConfigurationProperties props) throws SQLException;
Optional<PhysicalTableMetaData> load(String tableName, DatabaseType databaseType, Map<String, DataSource> dataSourceMap,
DataNodes dataNodes, T rule, ConfigurationProperties props) throws SQLException;
}
......@@ -44,8 +44,8 @@ public final class CommonFixtureLogicMetaDataLoader implements ShardingSphereMet
}
@Override
public Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final DataNodes dataNodes, final String tableName, final CommonFixtureRule rule, final ConfigurationProperties props) {
public Optional<PhysicalTableMetaData> load(final String tableName, final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final DataNodes dataNodes, final CommonFixtureRule rule, final ConfigurationProperties props) {
return Optional.empty();
}
......
......@@ -44,8 +44,8 @@ public final class DataNodeRoutedFixtureLogicMetaDataLoader implements ShardingS
}
@Override
public Optional<PhysicalTableMetaData> load(final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final DataNodes dataNodes, final String tableName, final DataNodeRoutedFixtureRule rule, final ConfigurationProperties props) {
public Optional<PhysicalTableMetaData> load(final String tableName, final DatabaseType databaseType, final Map<String, DataSource> dataSourceMap,
final DataNodes dataNodes, final DataNodeRoutedFixtureRule rule, final ConfigurationProperties props) {
return ("data_node_routed_table_0".equals(tableName) || "data_node_routed_table_1".equals(tableName))
? Optional.of(new PhysicalTableMetaData(Collections.emptyList(), Collections.emptyList())) : Optional.empty();
}
......
......@@ -31,9 +31,9 @@ import org.mockito.junit.MockitoJUnitRunner;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
......@@ -50,13 +50,10 @@ public final class SchemaMetaDataLoaderTest {
private ConfigurationProperties props;
@Test
public void assertSyncLoadFullDatabases() throws SQLException {
assertPhysicalSchemaMetaData(SchemaMetaDataLoader.load(databaseType, dataSource, Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), props));
}
@Test
public void assertAsyncLoadFullDatabases() throws SQLException {
assertPhysicalSchemaMetaData(SchemaMetaDataLoader.load(databaseType, dataSource, Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), props));
public void assertLoadFullDatabases() throws SQLException {
PhysicalSchemaMetaData actual = SchemaMetaDataLoader.load(
databaseType, Collections.singletonMap("logic_db", dataSource), Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), props);
assertPhysicalSchemaMetaData(actual);
}
private void assertPhysicalSchemaMetaData(final PhysicalSchemaMetaData actual) {
......@@ -68,14 +65,4 @@ public final class SchemaMetaDataLoaderTest {
assertTrue(actual.containsTable("data_node_routed_table_1"));
assertTrue(actual.get("data_node_routed_table_1").getColumns().containsKey("id"));
}
@Test
public void assertLoadWithExistedTableName() throws SQLException {
assertTrue(SchemaMetaDataLoader.load(databaseType, dataSource, Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), "data_node_routed_table_0", props).isPresent());
}
@Test
public void assertLoadWithNotExistedTableName() throws SQLException {
assertFalse(SchemaMetaDataLoader.load(databaseType, dataSource, Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), "invalid_table", props).isPresent());
}
}
/*
* 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 org.apache.shardingsphere.infra.metadata.schema.loader;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.metadata.schema.fixture.rule.CommonFixtureRule;
import org.apache.shardingsphere.infra.metadata.schema.fixture.rule.DataNodeRoutedFixtureRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Answers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@RunWith(MockitoJUnitRunner.class)
public final class TableMetaDataLoaderTest {
@Mock
private DatabaseType databaseType;
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private DataSource dataSource;
@Mock
private ConfigurationProperties props;
@Test
public void assertLoadWithExistedTableName() throws SQLException {
assertTrue(TableMetaDataLoader.load("data_node_routed_table_0",
databaseType, Collections.singletonMap("logic_db", dataSource), Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), props).isPresent());
}
@Test
public void assertLoadWithNotExistedTableName() throws SQLException {
assertFalse(TableMetaDataLoader.load("invalid_table",
databaseType, Collections.singletonMap("logic_db", dataSource), Arrays.asList(new CommonFixtureRule(), new DataNodeRoutedFixtureRule()), props).isPresent());
}
}
......@@ -27,16 +27,16 @@ import org.apache.shardingsphere.infra.executor.sql.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutor;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutorCallback;
import org.apache.shardingsphere.infra.metadata.schema.loader.SchemaMetaDataLoader;
import org.apache.shardingsphere.infra.metadata.schema.refresh.spi.SchemaMetaDataNotifier;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.schema.loader.TableMetaDataLoader;
import org.apache.shardingsphere.infra.metadata.schema.model.physical.PhysicalSchemaMetaData;
import org.apache.shardingsphere.infra.metadata.schema.refresh.MetaDataRefreshStrategy;
import org.apache.shardingsphere.infra.metadata.schema.refresh.MetaDataRefreshStrategyFactory;
import org.apache.shardingsphere.infra.metadata.schema.refresh.spi.SchemaMetaDataNotifier;
import org.apache.shardingsphere.infra.route.context.RouteMapper;
import org.apache.shardingsphere.infra.route.context.RouteUnit;
import org.apache.shardingsphere.infra.rule.DataNodeRoutedRule;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.ordered.OrderedSPIRegistry;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
......@@ -84,7 +84,7 @@ public abstract class AbstractStatementExecutor {
if (refreshStrategy.isPresent()) {
Collection<String> routeDataSourceNames = routeUnits.stream().map(RouteUnit::getDataSourceMapper).map(RouteMapper::getLogicName).collect(Collectors.toList());
refreshStrategy.get().refreshMetaData(metaData.getSchema(), schemaContexts.getDatabaseType(), routeDataSourceNames,
sqlStatement, tableName -> SchemaMetaDataLoader.load(schemaContexts.getDatabaseType(), dataSourceMap, metaData.getRuleMetaData().getRules(), tableName, schemaContexts.getProps()));
sqlStatement, tableName -> TableMetaDataLoader.load(tableName, schemaContexts.getDatabaseType(), dataSourceMap, metaData.getRuleMetaData().getRules(), schemaContexts.getProps()));
notifyPersistLogicMetaData(DefaultSchema.LOGIC_NAME, metaData.getSchema().getSchemaMetaData());
}
}
......
......@@ -30,14 +30,14 @@ import org.apache.shardingsphere.infra.executor.sql.log.SQLLogger;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.query.QueryHeader;
import org.apache.shardingsphere.infra.merge.MergeEngine;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.apache.shardingsphere.infra.metadata.schema.loader.SchemaMetaDataLoader;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.schema.loader.TableMetaDataLoader;
import org.apache.shardingsphere.infra.metadata.schema.model.physical.PhysicalTableMetaData;
import org.apache.shardingsphere.infra.metadata.schema.refresh.MetaDataRefreshStrategy;
import org.apache.shardingsphere.infra.metadata.schema.refresh.MetaDataRefreshStrategyFactory;
import org.apache.shardingsphere.infra.route.context.RouteMapper;
import org.apache.shardingsphere.infra.route.context.RouteUnit;
import org.apache.shardingsphere.infra.rule.DataNodeRoutedRule;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.SQLExecuteEngine;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
......@@ -111,8 +111,8 @@ public final class JDBCDatabaseCommunicationEngine implements DatabaseCommunicat
}
private Optional<PhysicalTableMetaData> loadTableMetaData(final String tableName) throws SQLException {
return SchemaMetaDataLoader.load(ProxyContext.getInstance().getSchemaContexts().getDatabaseType(),
metaData.getResource().getDataSources(), metaData.getRuleMetaData().getRules(), tableName, ProxyContext.getInstance().getSchemaContexts().getProps());
return TableMetaDataLoader.load(tableName, ProxyContext.getInstance().getSchemaContexts().getDatabaseType(),
metaData.getResource().getDataSources(), metaData.getRuleMetaData().getRules(), ProxyContext.getInstance().getSchemaContexts().getProps());
}
private BackendResponse merge(final SQLStatementContext<?> sqlStatementContext) throws SQLException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册