Generate Keywords of a Concurrency Control Rule from the Original SQL Statement
Function
This API is used to generate keywords of a concurrency control rule from the original SQL statement. Currently, RDS for MySQL, RDS for MariaDB, and GaussDB(for MySQL) engines are supported.
URI
POST /v3/{project_id}/instances/{instance_id}/sql-limit/parse
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
X-Auth-Token |
Yes |
String |
User token. |
X-Language |
No |
String |
Language. Values:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
datastore_type |
Yes |
String |
Database type. Currently, RDS for MySQL, RDS for MariaDB, and GaussDB(for MySQL) are supported. Values:
|
original_sql |
Yes |
String |
Original SQL Statement. Minimum length: 1 Maximum length: 1024 |
use_template |
Yes |
Boolean |
Indicates whether to verify SQL statements. |
keep_operators |
Yes |
Boolean |
Whether to retain operators. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
rule |
String |
SQL concurrency control keyword. |
Example Requests
Generating keywords of a concurrency control rule from the original SQL statement
https://das.cn-north-1.myhuaweicloud.com/v3/054c630ff780d4cc2f40c00d7f6fb21d/instances/da304cd5bbb944de828759bc7be3d3fein01/sql-limit/parse { "datastore_type" : "MySQL", "original_sql" : "select * from das_conn_info", "use_template" : true, "keep_operators" : true }
Example Responses
Status code: 200
Return of generating SQL concurrency control keywords
{ "rule" : "select~from~das_conn_info" }
Status Code
Status Code |
Description |
---|---|
200 |
Return of generating SQL concurrency control keywords. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot