-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress further logging of bad regex (#112)
- Loading branch information
Showing
5 changed files
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package types | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// A FrozenStoredQuery is a stored query which will be evaluated | ||
// inside the defined scope instead of the calling scope. | ||
type FrozenStoredQuery struct { | ||
query StoredQuery | ||
defined_scope Scope | ||
} | ||
|
||
func (self FrozenStoredQuery) Query() StoredQuery { | ||
return self.query | ||
} | ||
|
||
func (self FrozenStoredQuery) Eval( | ||
ctx context.Context, scope Scope) <-chan Row { | ||
return self.query.Eval(ctx, self.defined_scope) | ||
} | ||
|
||
func NewFrozenStoredQuery( | ||
query StoredQuery, scope Scope) StoredQuery { | ||
return &FrozenStoredQuery{query: query, defined_scope: scope} | ||
} |
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