You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/31 02:19:32 UTC
[GitHub] [shardingsphere] Swastyy opened a new pull request, #18079: ALTER Resources
Swastyy opened a new pull request, #18079:
URL: https://github.com/apache/shardingsphere/pull/18079
Fixes #16679
Changes proposed in this pull request:
-
-
-
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] lanchengx merged pull request #18079: ALTER Resources
Posted by GitBox <gi...@apache.org>.
lanchengx merged PR #18079:
URL: https://github.com/apache/shardingsphere/pull/18079
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] everly-gif commented on a diff in pull request #18079: ALTER Resources
Posted by GitBox <gi...@apache.org>.
everly-gif commented on code in PR #18079:
URL: https://github.com/apache/shardingsphere/pull/18079#discussion_r885250065
##########
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:
Could we add an `Example` section here ? Just like `ADD RESOURCE`
https://shardingsphere.apache.org/document/current/en/reference/distsql/syntax/rdl/resource-definition/add-resource/
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] Swastyy commented on a diff in pull request #18079: ALTER Resources
Posted by GitBox <gi...@apache.org>.
Swastyy commented on code in PR #18079:
URL: https://github.com/apache/shardingsphere/pull/18079#discussion_r885338104
##########
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:
Yepp, thanks for the links :)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] Swastyy commented on a diff in pull request #18079: ALTER Resources
Posted by GitBox <gi...@apache.org>.
Swastyy commented on code in PR #18079:
URL: https://github.com/apache/shardingsphere/pull/18079#discussion_r885265904
##########
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:
Ofcourse, do you want to provide an example?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] everly-gif commented on a diff in pull request #18079: ALTER Resources
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org