-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ShowShadowAlgorithmPluginsResultRowBuilder & ShowMaskAlgorit…
…hmPluginsResultRowBuilder (#30079) * Refactor ShowShadowAlgorithmPluginsResultRowBuilder * Refactor ShowMaskAlgorithmPluginsResultRowBuilder
- Loading branch information
1 parent
df78716
commit 1d727c6
Showing
12 changed files
with
138 additions
and
161 deletions.
There are no files selected for viewing
52 changes: 0 additions & 52 deletions
52
...e/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...e/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmPluginsResultRowBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 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.mask.distsql.handler.query; | ||
|
||
import org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin.PluginMetaDataQueryResultRows; | ||
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder; | ||
import org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement; | ||
import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; | ||
import org.apache.shardingsphere.mask.spi.MaskAlgorithm; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Show mask algorithm plugins result row builder. | ||
*/ | ||
public final class ShowMaskAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder { | ||
|
||
private final PluginMetaDataQueryResultRows pluginMetaDataQueryResultRows = new PluginMetaDataQueryResultRows(MaskAlgorithm.class); | ||
|
||
@Override | ||
public Collection<LocalDataQueryResultRow> generateRows(final ShowPluginsStatement sqlStatement) { | ||
return pluginMetaDataQueryResultRows.getRows(); | ||
} | ||
|
||
@Override | ||
public Collection<String> getColumnNames() { | ||
return pluginMetaDataQueryResultRows.getColumnNames(); | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return "MASK_ALGORITHM"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmPluginsResultRowBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
...ache/shardingsphere/mask/distsql/statement/ShowMaskAlgorithmImplementationsStatement.java
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
...ardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmImplementationsExecutor.java
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...ardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmPluginsResultRowBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 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.shadow.distsql.handler.query; | ||
|
||
import org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin.PluginMetaDataQueryResultRows; | ||
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder; | ||
import org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement; | ||
import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; | ||
import org.apache.shardingsphere.shadow.spi.ShadowAlgorithm; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Show shadow algorithm plugins result row builder. | ||
*/ | ||
public final class ShowShadowAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder { | ||
|
||
private final PluginMetaDataQueryResultRows pluginMetaDataQueryResultRows = new PluginMetaDataQueryResultRows(ShadowAlgorithm.class); | ||
|
||
@Override | ||
public Collection<LocalDataQueryResultRow> generateRows(final ShowPluginsStatement sqlStatement) { | ||
return pluginMetaDataQueryResultRows.getRows(); | ||
} | ||
|
||
@Override | ||
public Collection<String> getColumnNames() { | ||
return pluginMetaDataQueryResultRows.getColumnNames(); | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return "SHADOW_ALGORITHM"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowAlgorithmPluginsResultRowBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
.../shardingsphere/shadow/distsql/statement/ShowShadowAlgorithmImplementationsStatement.java
This file was deleted.
Oops, something went wrong.