Skip to content

Commit

Permalink
fix: replace interface with map
Browse files Browse the repository at this point in the history
  • Loading branch information
littleniannian committed Jan 7, 2025
1 parent 57948e8 commit a8555db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
22 changes: 3 additions & 19 deletions sqle/api/controller/v1/sql_manage.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,25 +264,9 @@ type SqlAnalysisChart struct {
}

type ChartPoint struct {
X *string `json:"x"`
Y *float64 `json:"y"`
Info interface{} `json:"info"`
}

type ExecutePlan struct {
Id *int `json:"id"`
SelectId *int `json:"select_id"`
Table *string `json:"table"`
Partitions *string `json:"partitions"`
Type *string `json:"type"`
PossibleKeys *string `json:"possible_keys"`
Key *string `json:"key"`
KeyLen *string `json:"key_len"`
Ref *string `json:"ref"`
Rows *int `json:"rows"`
Filtered *int `json:"filtered"`
SelectType *string `json:"select_type"`
Extra *string `json:"extra"`
X *string `json:"x"`
Y *float64 `json:"y"`
Info map[string]string `json:"info"`
}

type GetSqlManageSqlAnalysisResp struct {
Expand Down
5 changes: 4 additions & 1 deletion sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12395,7 +12395,10 @@ var doc = `{
"type": "object",
"properties": {
"info": {
"type": "object"
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"x": {
"type": "string"
Expand Down
5 changes: 4 additions & 1 deletion sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12379,7 +12379,10 @@
"type": "object",
"properties": {
"info": {
"type": "object"
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"x": {
"type": "string"
Expand Down
2 changes: 2 additions & 0 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,8 @@ definitions:
v1.ChartPoint:
properties:
info:
additionalProperties:
type: string
type: object
x:
type: string
Expand Down

0 comments on commit a8555db

Please sign in to comment.