everly-gif commented on code in PR #18079:
URL: https://github.com/apache/shardingsphere/pull/18079#discussion_r885328012


##########
docs/document/content/reference/distsql/syntax/rdl/resource-definition/alter-resource.en.md:
##########
@@ -0,0 +1,57 @@
++++
+title = "ALTER RESOURCE"
+weight = 3
++++
+
+
+### Description
+
+The `ALTER RESOURCE` syntax is used to alter resources for the currently 
selected schema.
+
+
+
+### Syntax
+```SQL
+AlterResource ::=
+  'ALTER' 'RESOURCE' dataSource (',' dataSource)*
+
+dataSource ::=
+  dataSourceName '(' ( 'HOST' '=' hostName ',' 'PORT' '=' port ',' 'DB' '=' 
dbName  |  'URL' '=' url  ) ',' 'USER' '=' user (',' 'PASSWORD' '=' password )? 
 (',' 'PROPERTIES'  '(' ( key  '=' value ) ( ',' key  '=' value )* ')'  )?')'
+
+dataSourceName ::=
+  identifier
+
+hostname ::=
+  identifier | ip
+
+dbName ::=
+  identifier
+
+port ::=
+  int
+
+password ::=
+  identifier | int | string 
+
+user ::=
+  identifier
+
+url ::=
+  identifier | string
+
+```
+

Review Comment:
   Referring the syntax in the `g4` file for `ALTER RESOURCE` => 
https://github.com/apache/shardingsphere/blob/master/shardingsphere-distsql/shardingsphere-distsql-parser/src/main/antlr4/imports/RDLStatement.g4#L26
   
   You can use the same examples from `ADD RESOURCE` Just change `ADD RESOURCE` 
to `ALTER RESOURCE` in the examples .



-- 
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]

Reply via email to