mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
rename QueryList to PqlList for clarity
This commit is contained in:
parent
66f3aeb21c
commit
52f1b3661e
3 changed files with 6 additions and 6 deletions
|
|
@ -103,10 +103,10 @@ func (self *Executor) RunPQL(database_name string, pql string) interface{} {
|
|||
return final
|
||||
|
||||
} else {
|
||||
macros_dir := config.Get("macros").(string)
|
||||
macros_dir := config.GetString("macros")
|
||||
macros_file := macros_dir + "/" + outer_token + ".js"
|
||||
filter := query.TokensToString(tokens)
|
||||
query_list := GetMacro(macros_file, filter).(query.QueryList)
|
||||
query_list := GetMacro(macros_file, filter).(query.PqlList)
|
||||
|
||||
for i, _ := range query_list {
|
||||
qry := query.QueryForPQL(query_list[i].PQL)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ func GetMacro(file_name string, filter string) interface{} {
|
|||
spew.Dump(err)
|
||||
}
|
||||
|
||||
var query_list query.QueryList
|
||||
var query_list query.PqlList
|
||||
|
||||
// ql is []interface{}
|
||||
switch ql := query_list_interface.(type) {
|
||||
|
|
@ -40,7 +40,7 @@ func GetMacro(file_name string, filter string) interface{} {
|
|||
spew.Dump(q)
|
||||
spew.Dump(q["label"].(string))
|
||||
spew.Dump(q["pql"].(string))
|
||||
query_list = append(query_list, query.QueryListItem{Label: q["label"].(string), PQL: q["pql"].(string)})
|
||||
query_list = append(query_list, query.PqlListItem{Label: q["label"].(string), PQL: q["pql"].(string)})
|
||||
}
|
||||
default:
|
||||
spew.Dump("DEFAULT")
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ type QueryResults struct {
|
|||
Data interface{}
|
||||
}
|
||||
|
||||
type QueryList []QueryListItem
|
||||
type PqlList []PqlListItem
|
||||
|
||||
type QueryListItem struct {
|
||||
type PqlListItem struct {
|
||||
Id *uuid.UUID
|
||||
Label string
|
||||
PQL string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue