lanchengx opened a new issue, #16666: URL: https://github.com/apache/shardingsphere/issues/16666
### Background A plan to refactor DistSQL documentation is proposed in https://github.com/apache/shardingsphere/issues/15604. This issue is used to describe how the documentation content should be written. ### Document content The document needs to include **syntax names**, **syntax definitions**, **examples**, and if it is a query statement, **column name explanation** need to be added #### Explanation #### 1. Syntax names Determined by the keyword in the grammar definition. _E.g_ - `ADD RESOURCE datasource` syntax has the syntax name `ADD RESOURCE` - The `CREATE SHARDING TABLE RULE rule definition` syntax is named `CREATE SHARDING TABLE RULE` #### 2. Syntax definition Determined by the `g4` file, which will be given in the corresponding task. In addition, you need to modify the `ANTRL4` grammar in the g4 file to `EBNF` grammar, you can refer to [Railroad Diagram Generator](https://www.bottlecaps.de/rr/ui) or other. _E.g_ ``` addResource : ADD RESOURCE dataSource (COMMA dataSource)* ``` needs to be adjusted to ``` AddResource ::= 'ADD' 'RESOURCE' dataSource (',' dataSource)* ``` The keywords `ADD`, `RESOURCE`, `,` are required `'` #### 3. Example It is necessary to show the usage of the syntax in as much detail as possible. #### 4. Column name explanation You can refer to the previous DistSQL syntax document. _E.g_ [return-value-description](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rql/resource-query/#return-value-description) <img width="818" alt="image" src="https://user-images.githubusercontent.com/52209337/162417663-f580a6b3-51a9-4db5-9880-7e920df3ea3d.png"> --- ### Supplement Documentation on the structure of the documentation and the syntax of `ADD RESOURCE` has been submitted at https://github.com/apache/shardingsphere/pull/16659. Documentation is temporarily under `docs/document/content/reference` and will be moved to `docs/document/content/user-manual/shardingsphere-proxy` when complete This document refactoring has the following tasks Task list (continuously added) - [x] ADD RESOURCE - [ ] #16679 - [x] DROP RESOURCE - [x] SHOW RESOURCE - [x] #16681 - [ ] #16683 - [x] CREATE SHARDING TABLE RULE - [x] CREATE SHARDING BINDING TABLE RULE - [x] CREATE SHARDING ALGORITHM - [x] SHOW SHARDING TABLE RULE - [ ] SHOW SHARDING ALGORITHM -- 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]
