This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e56de30bde0 Update ImportDatabaseConfigurationHandler (#23249)
e56de30bde0 is described below
commit e56de30bde0392f814ee38a32dcadc7f73564c53
Author: Zichao <[email protected]>
AuthorDate: Mon Jan 2 21:42:09 2023 +1300
Update ImportDatabaseConfigurationHandler (#23249)
---
.../distsql/ral/updatable/ImportDatabaseConfigurationHandler.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationHandler.java
b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationHandler.java
index 5f0d0d8ebe7..11f918a3d8c 100644
---
a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationHandler.java
+++
b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/ImportDatabaseConfigurationHandler.java
@@ -35,6 +35,9 @@ import
org.apache.shardingsphere.distsql.handler.exception.storageunit.InvalidSt
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
+import org.apache.shardingsphere.mask.api.config.MaskRuleConfiguration;
+import org.apache.shardingsphere.mask.yaml.config.YamlMaskRuleConfiguration;
+import
org.apache.shardingsphere.mask.yaml.swapper.YamlMaskRuleConfigurationSwapper;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
import
org.apache.shardingsphere.proxy.backend.config.yaml.YamlProxyDataSourceConfiguration;
@@ -159,6 +162,10 @@ public final class ImportDatabaseConfigurationHandler
extends UpdatableRALBacken
ShadowRuleConfiguration shadowRuleConfig = new
YamlShadowRuleConfigurationSwapper().swapToObject((YamlShadowRuleConfiguration)
each);
// TODO check
ruleConfigs.add(shadowRuleConfig);
+ } else if (each instanceof YamlMaskRuleConfiguration) {
+ MaskRuleConfiguration maskRuleConfig = new
YamlMaskRuleConfigurationSwapper().swapToObject((YamlMaskRuleConfiguration)
each);
+ // TODO check
+ ruleConfigs.add(maskRuleConfig);
}
}
database.getRuleMetaData().getConfigurations().addAll(ruleConfigs);