diff --git a/sqle/api/controller/v1/sql_query.go b/sqle/api/controller/v1/sql_query.go index 2afa54bbaa..d314ff28f2 100644 --- a/sqle/api/controller/v1/sql_query.go +++ b/sqle/api/controller/v1/sql_query.go @@ -53,11 +53,6 @@ type GetSQLResultResV1 struct { } type GetSQLResultResDataV1 struct { - ExecuteResult []SQLResultItemResV1 `json:"execute_result"` -} - -// multiple SQLs may be passed in, and each SQL corresponds to an Item -type SQLResultItemResV1 struct { SQL string `json:"sql"` StartLine int `json:"start_line"` EndLine int `json:"end_line"` diff --git a/sqle/docs/docs.go b/sqle/docs/docs.go index 9bd34c150d..7a0235d99d 100644 --- a/sqle/docs/docs.go +++ b/sqle/docs/docs.go @@ -5814,11 +5814,35 @@ var doc = `{ "v1.GetSQLResultResDataV1": { "type": "object", "properties": { - "execute_result": { + "current_page": { + "type": "integer" + }, + "end_line": { + "type": "integer" + }, + "execution_time": { + "type": "integer" + }, + "head": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.SQLResultItemHeadResV1" + } + }, + "rows": { "type": "array", "items": { - "$ref": "#/definitions/v1.SQLResultItemResV1" + "type": "object", + "additionalProperties": { + "type": "string" + } } + }, + "sql": { + "type": "string" + }, + "start_line": { + "type": "integer" } } }, @@ -6702,41 +6726,6 @@ var doc = `{ } } }, - "v1.SQLResultItemResV1": { - "type": "object", - "properties": { - "current_page": { - "type": "integer" - }, - "end_line": { - "type": "integer" - }, - "execution_time": { - "type": "integer" - }, - "head": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.SQLResultItemHeadResV1" - } - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "sql": { - "type": "string" - }, - "start_line": { - "type": "integer" - } - } - }, "v1.SystemVariablesResV1": { "type": "object", "properties": { diff --git a/sqle/docs/swagger.json b/sqle/docs/swagger.json index 195892ccfc..975649340e 100644 --- a/sqle/docs/swagger.json +++ b/sqle/docs/swagger.json @@ -5798,11 +5798,35 @@ "v1.GetSQLResultResDataV1": { "type": "object", "properties": { - "execute_result": { + "current_page": { + "type": "integer" + }, + "end_line": { + "type": "integer" + }, + "execution_time": { + "type": "integer" + }, + "head": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.SQLResultItemHeadResV1" + } + }, + "rows": { "type": "array", "items": { - "$ref": "#/definitions/v1.SQLResultItemResV1" + "type": "object", + "additionalProperties": { + "type": "string" + } } + }, + "sql": { + "type": "string" + }, + "start_line": { + "type": "integer" } } }, @@ -6686,41 +6710,6 @@ } } }, - "v1.SQLResultItemResV1": { - "type": "object", - "properties": { - "current_page": { - "type": "integer" - }, - "end_line": { - "type": "integer" - }, - "execution_time": { - "type": "integer" - }, - "head": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.SQLResultItemHeadResV1" - } - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "sql": { - "type": "string" - }, - "start_line": { - "type": "integer" - } - } - }, "v1.SystemVariablesResV1": { "type": "object", "properties": { diff --git a/sqle/docs/swagger.yaml b/sqle/docs/swagger.yaml index e8087b41fa..ae122cb1f4 100644 --- a/sqle/docs/swagger.yaml +++ b/sqle/docs/swagger.yaml @@ -1014,10 +1014,26 @@ definitions: type: object v1.GetSQLResultResDataV1: properties: - execute_result: + current_page: + type: integer + end_line: + type: integer + execution_time: + type: integer + head: + items: + $ref: '#/definitions/v1.SQLResultItemHeadResV1' + type: array + rows: items: - $ref: '#/definitions/v1.SQLResultItemResV1' + additionalProperties: + type: string + type: object type: array + sql: + type: string + start_line: + type: integer type: object v1.GetSQLResultResV1: properties: @@ -1611,29 +1627,6 @@ definitions: field_name: type: string type: object - v1.SQLResultItemResV1: - properties: - current_page: - type: integer - end_line: - type: integer - execution_time: - type: integer - head: - items: - $ref: '#/definitions/v1.SQLResultItemHeadResV1' - type: array - rows: - items: - additionalProperties: - type: string - type: object - type: array - sql: - type: string - start_line: - type: integer - type: object v1.SystemVariablesResV1: properties: workflow_expired_hours: