HarshSawarkar commented on issue #29233:
URL:
https://github.com/apache/shardingsphere/issues/29233#issuecomment-1911747633
Hey @Pace2Car, I would like to work on this issue if no one is working on it
currently. Also I had this doubt in
> CreateEncryptRuleStatementUpdater
>
> ```java
> @Override
> public void checkSQLStatement(final ShardingSphereDatabase database,
final CreateEncryptRuleStatement sqlStatement, final EncryptRuleConfiguration
currentRuleConfig) {
> if (!sqlStatement.isIfNotExists()) {
> checkDuplicateRuleNames(database.getName(), sqlStatement,
currentRuleConfig);
> }
> checkColumnNames(sqlStatement);
> checkAlgorithmTypes(sqlStatement);
> checkToBeCreatedEncryptors(sqlStatement);
> checkDataSources(database);
> }
>
> private void checkDataSources(final ShardingSphereDatabase database) {
>
ShardingSpherePreconditions.checkState(!database.getResourceMetaData().getStorageUnits().isEmpty(),
() -> new EmptyStorageUnitException(database.getName()));
> }
> ```
>
> I am going to extract this check into the RuleDefinitionBackendHandler as
a public check for all statements that create rules.
by checks do you mean only the Datasource check or all the listed checks in
the method and also some of the statements that create rules like
**_CreateMaskRuleExecutor_** dosn't check for **_DataSource_**. So, should this
statements be checked for DataSource? Furthermore, the
**_RuleDefinitionBackendHandler_** class is from **_Proxy_** package, so to be
able to checkDataSource() implemented in the
**_RuleDefinitionBackendHandler_**, this module has to be added in the
corresponding _create rule class_. Will this implementation be correct?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]