-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lang): Update Compiler interface to produce a Program (#1095)
Fixes #1086.
- Loading branch information
Christopher M. Wolff
committed
Apr 12, 2019
1 parent
90ce58c
commit 0e244f9
Showing
10 changed files
with
176 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package lang | ||
|
||
import ( | ||
"github.com/influxdata/flux" | ||
) | ||
|
||
// Query implements the flux.Query interface. | ||
type Query struct { | ||
ch chan flux.Result | ||
} | ||
|
||
func (q *Query) Results() <-chan flux.Result { | ||
return q.ch | ||
} | ||
|
||
func (q *Query) Done() { | ||
// consume all remaining elements so channel can be closed | ||
for ok := true; ok == true; _, ok = <-q.ch {} | ||
} | ||
|
||
func (*Query) Cancel() { | ||
} | ||
|
||
func (*Query) Err() error { | ||
return nil | ||
} | ||
|
||
func (*Query) Statistics() flux.Statistics { | ||
return flux.Statistics{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.