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, MySQL, MariaDB, and TaurusDB 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. Enumerated values:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
datastore_type |
Yes |
String |
Database type, which can be MySQL, MariaDB, and TaurusDB Enumerated values:
|
original_sql |
Yes |
String |
Original SQL Statement. Minimum length: 1 character Maximum length: 1024 characters |
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 Request
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 Response
Status code: 200
Return of generating SQL concurrency control keywords
{ "rule" : "select~from~das_conn_info" }
Status Codes
Status Code |
Description |
---|---|
200 |
Return of generating SQL concurrency control keywords. |
Error Codes
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