Implement percentileAgg

This commit is contained in:
Alexander Zobnin
2021-05-27 10:13:48 +03:00
parent ac220a76e8
commit 62d569cd53
4 changed files with 99 additions and 41 deletions

View File

@@ -66,9 +66,9 @@ type QueryOptions struct {
// QueryOptions model
type QueryFunction struct {
Def QueryFunctionDef `json:"def"`
Params []string `json:"params"`
Text string `json:"text"`
Def QueryFunctionDef `json:"def"`
Params []QueryFunctionParam `json:"params"`
Text string `json:"text"`
}
// QueryOptions model
@@ -76,7 +76,7 @@ type QueryFunctionDef struct {
Name string `json:"name"`
Category string `json:"category"`
Params []QueryFunctionParamDef `json:"params"`
DefaultParams []interface{} `json:"defaultParams"`
DefaultParams []QueryFunctionParam `json:"defaultParams"`
}
type QueryFunctionParamDef struct {
@@ -84,6 +84,8 @@ type QueryFunctionParamDef struct {
Type string `json:"type"`
}
type QueryFunctionParam = interface{}
// ReadQuery will read and validate Settings from the DataSourceConfg
func ReadQuery(query backend.DataQuery) (QueryModel, error) {
model := QueryModel{}