Skip to content

Commit

Permalink
fix(cmd.queriesCmd): fix query listing command
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Dec 12, 2017
1 parent 6010e9f commit 5ce7d38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func PrintQuery(i int, r *repo.DatasetRef) {
white := color.New(color.FgWhite).SprintFunc()
cyan := color.New(color.FgCyan).SprintFunc()
blue := color.New(color.FgBlue).SprintFunc()
fmt.Printf("%s:\t%s\n\t%s\n", cyan(i), white(r.Dataset.QueryString), blue(r.Path))
fmt.Printf("%s:\t%s\n\t%s\n", cyan(i), white(r.Dataset.Transform.Data), blue(r.Path))
}

func PrintResults(r *dataset.Structure, data []byte, format dataset.DataFormat) {
Expand Down
3 changes: 2 additions & 1 deletion core/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ func (d *QueryRequests) List(p *ListParams, res *[]*repo.DatasetRef) error {

results := make([]*repo.DatasetRef, len(items))
for i, item := range items {
results[i].Path = item.DatasetPath
results[i] = &repo.DatasetRef{Path: item.DatasetPath}
if ds, err := dsfs.LoadDataset(d.repo.Store(), item.DatasetPath); err == nil {
results[i].Name = ds.Transform.Data
results[i].Dataset = ds
}
}
Expand Down

0 comments on commit 5ce7d38

Please sign in to comment.