RaigorJiang opened a new issue #11677: URL: https://github.com/apache/shardingsphere/issues/11677
Hi community, Currently, the [SCTL](https://shardingsphere.apache.org/document/current/en/features/dist-sql/syntax/sctl/sctl/) syntax is identified by the pre-keyword'sctl:', and special processing is required in the SQL parsing process, which also makes SCTL statements not like SQL statements. Now we consider the refactoring of SCTL, which mainly includes two aspects: 1. Remove the pre-keyword and redesign the SCTL syntax, similar to [RDL](https://shardingsphere.apache.org/document/current/en/features/dist-sql/syntax/rdl/rdl-sharding-rule/) and [RQL](https://shardingsphere.apache.org/document/current/en/features/dist-sql/syntax/rql/rql-sharding-rule/). Here are some examples: | Before | After | |:---------------------------------------|:---------------------------------------| |sctl:set transaction_type=XX |set variable transaction_type=XX | |sctl:show transaction_type |show variable transaction_type | |sctl:show cached_connections |show variable cached_connections | |sctl:explain SQL |preview SQL | |sctl:hint set PRIMARY_ONLY=true |set readwrite_splitting hint source = [auto / write] | |sctl:hint set DatabaseShardingValue=yy |set sharding hint database_value = yy; | |sctl:hint addDatabaseShardingValue xx=yy|add sharding hint database_value xx= yy; | |sctl:hint addTableShardingValue xx=yy |add sharding hint table_value xx = yy | |sctl:hint clear |clear [hint / sharding hint / readwrite_splitting hint] | |sctl:hint show status |show [sharding / readwrite_splitting] hint status | |sctl:hint show table status |- | <br/> 2. Process SCTL in accordance with the process of DistSQL without special judgment; The tasks are: - [ ] The syntax of `set variable` - [ ] The syntax of `show variable` - [ ] The syntax of `preview SQL` - [ ] The syntax of `set sharding hint` - [ ] The syntax of `add sharding hint` - [ ] The syntax of `set readwrite_splitting hint` - [ ] The syntax of `clear [hint / sharding hint / readwrite_splitting hint]` - [ ] The syntax of `show [sharding / readwrite_splitting] hint status` <br/> If you have any ideas and suggestions, welcome to discuss. -- 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]
