Retrieves the SQL details of an SQL review ticket.
Operation description
For more information about the SQL review feature, see SQL review.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListSQLReviewOriginSQL |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| OrderId |
integer |
Yes |
The ID of the SQL review ticket. You can call the CreateSQLReviewOrder operation to obtain this parameter. |
903**** |
| OrderActionDetail |
object |
No |
The ticket parameters (filter conditions). |
|
| FileId |
integer |
No |
The ID of the reviewed file. |
85**** |
| SQLReviewResult |
string |
No |
The SQL review optimization suggestions. Valid values:
|
MUST_IMPROVE |
| CheckStatusResult |
string |
No |
The check result. Valid values:
|
check_not_pass |
| Page |
object |
No |
The pagination parameters. |
|
| PageNumber |
integer |
No |
The number of the page to return. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. |
20 |
| Tid |
integer |
No |
The tenant ID. You can call the GetUserActiveTenant or ListUserTenants operation to obtain this parameter. |
233*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is used to locate logs and troubleshoot issues. |
0A00863F-6366-5583-9B96-891DC8D8F88A |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message returned if the API call fails. |
UnknownError |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
| TotalCount |
integer |
The number of SQL statements contained in the file. |
1 |
| OriginSQLList |
array<object> |
The list of parsed SQL statements. |
|
|
object |
The details of a single SQL statement. |
||
| SQLId |
integer |
The ID of the SQL statement. |
1111 |
| FileId |
integer |
The ID of the file. |
858*** |
| FileName |
string |
The name of the file. |
test.sql |
| SQLContent |
string |
The SQL content in the file. |
CREATE TABLE `test_sql_review_table` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `gmt_create` datetime NOT NULL, `name` varchar(256) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| CheckStatus |
string |
The check result. Valid values:
|
check_pass |
| StatusDesc |
string |
The description of the check result. |
Check passed |
| CheckedTime |
string |
The time when the SQL statement was checked. |
2021-06-09 21:07:00 |
| SqlHash |
string |
The value obtained by applying the MD5 hash algorithm to the SQL content. |
c7992dc1b681c6733894aded7834f423 |
| ReviewSummary |
string |
The statistics on SQL review optimization suggestions (JSON character string). Valid values:
|
{\"SUGGEST_IMPROVE\":2,\"POTENTIAL_ISSUE\":1} |
| SQLReviewQueryKey |
string |
The key used to query the information about SQL review optimization suggestions. You can call the GetSQLReviewOptimizeDetail operation based on this key to obtain the details. |
6e9a4bc6867a4174a96b23c8b48b**** |
| SQLName |
string |
The name of the SQL statement. |
getByPk |
Examples
Success response
JSON format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true,
"TotalCount": 10,
"OriginSQLList": [
{
"SQLId": 1111,
"FileId": 123321,
"FileName": "test.sql",
"SQLContent": "select id from table_name",
"CheckStatus": "check_pass",
"StatusDesc": "passed the test",
"CheckedTime": "2021-06-09 21:07:00",
"SqlHash": "95adb6e77a0884d9e50232cb8c5c969d",
"ReviewSummary": "{\"POTENTIAL_ISSUE\":1,\"SUGGEST_IMPROVE\":1}",
"SQLReviewQueryKey": "a57e54ec5433475ea3082d882fdb89c5",
"SQLName": "getByPk"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.