RaigorJiang commented on issue #11100:
URL: 
https://github.com/apache/shardingsphere/issues/11100#issuecomment-873857216


   After discussion with @tristaZero , we decided to optimize the syntax 
structure to make the `add resource` statement closer to the yaml configuration 
format, allowing users to reuse their data source configuration more 
conveniently.
   
   #### YAML
   ```yaml
   ds_0:
       url: 
jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
       maintenanceIntervalMilliseconds: 30000
   ```
   
   #### DistSQL: Add Resource
   ```
   ADD RESOURCE resource_0 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false"
       USER=root,
       PASSWORD=root,
       PROPERTIES("maxPoolSize"=50, "idleTimeoutMilliseconds"="60000")
   );
   ```
   Like the example above, the format of `URL` is consistent with which in 
yaml, and propertise is an optional parameter used to configure the properties 
of the connection pool.
   


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