Skip to content

Commit a8555db

Browse files
fix: replace interface with map
1 parent 57948e8 commit a8555db

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

sqle/api/controller/v1/sql_manage.go

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -264,25 +264,9 @@ type SqlAnalysisChart struct {
264264
}
265265

266266
type ChartPoint struct {
267-
X *string `json:"x"`
268-
Y *float64 `json:"y"`
269-
Info interface{} `json:"info"`
270-
}
271-
272-
type ExecutePlan struct {
273-
Id *int `json:"id"`
274-
SelectId *int `json:"select_id"`
275-
Table *string `json:"table"`
276-
Partitions *string `json:"partitions"`
277-
Type *string `json:"type"`
278-
PossibleKeys *string `json:"possible_keys"`
279-
Key *string `json:"key"`
280-
KeyLen *string `json:"key_len"`
281-
Ref *string `json:"ref"`
282-
Rows *int `json:"rows"`
283-
Filtered *int `json:"filtered"`
284-
SelectType *string `json:"select_type"`
285-
Extra *string `json:"extra"`
267+
X *string `json:"x"`
268+
Y *float64 `json:"y"`
269+
Info map[string]string `json:"info"`
286270
}
287271

288272
type GetSqlManageSqlAnalysisResp struct {

sqle/docs/docs.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12395,7 +12395,10 @@ var doc = `{
1239512395
"type": "object",
1239612396
"properties": {
1239712397
"info": {
12398-
"type": "object"
12398+
"type": "object",
12399+
"additionalProperties": {
12400+
"type": "string"
12401+
}
1239912402
},
1240012403
"x": {
1240112404
"type": "string"

sqle/docs/swagger.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12379,7 +12379,10 @@
1237912379
"type": "object",
1238012380
"properties": {
1238112381
"info": {
12382-
"type": "object"
12382+
"type": "object",
12383+
"additionalProperties": {
12384+
"type": "string"
12385+
}
1238312386
},
1238412387
"x": {
1238512388
"type": "string"

sqle/docs/swagger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ definitions:
663663
v1.ChartPoint:
664664
properties:
665665
info:
666+
additionalProperties:
667+
type: string
666668
type: object
667669
x:
668670
type: string

0 commit comments

Comments
 (0)