Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct api response #533

Merged
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions sqle/api/controller/v1/sql_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
63 changes: 26 additions & 37 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -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": {
Expand Down
63 changes: 26 additions & 37 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -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": {
Expand Down
43 changes: 18 additions & 25 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down