[OpenForce 2022] Modify capitalization of keywords in RAL grammar documents
See original GitHub issueHi community,
This issue is for https://github.com/apache/shardingsphere/discussions/12683#discussioncomment-2139441
Background
DistSQL(Distributed SQL)is Apache ShardingSphere specific SQL.
In documentation we usually use all uppercase words for grammar keywords and camel case for grammar variables.
For example, in the syntax ADD RESOURCE dataSource
, ADD
and RESOURCE
are syntax keywords, dataSource
is variable
Aim
Modify grammar keywords in documents to uppercase.
The following files need to be modified
- docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
- docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
How to
- Open the grammar document that needs to be modified
- Find the column that needs to be modified. The
Statement
column andExample
in the table are the columns that need to be modified - Identify syntax keywords.
- Determined by the grammar definition file.
The grammar definition file is as follows
- shardingsphere-distsql/shardingsphere-distsql-parser/src/main/antlr4/imports/RALStatement.g4
- shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/antlr4/imports/readwrite-splitting/RALStatement.g4
- shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/sharding/RALStatement.g4
- shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/scaling/RALStatement.g4
Example
Take modifying set readwrite_splitting hint source = [auto/write]
as an example.
Search set readwrite_splitting hint source
to determine the file where the grammar is located is shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-parser/src/main/antlr4/imports/ readwrite-splitting/RALStatement.g4
.
The syntax is defined as SET READWRITE_SPLITTING HINT SOURCE EQ sourceValue
.
So set readwrite_splitting hint source = [auto/write]
should be changed to SET READWRITE_SPLITTING HINT SOURCE = [auto/write]
Example FYI
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:15 (14 by maintainers)
@ritikBhandari it is wanted. I will merge your other PR soon
I guess
cn
means Chinese. Right?