Make query/... interfaces more idiomatic
Also revert the data type returned by queries to interface{} (the change
made sense at the time).
This commit is contained in:
parent
ad7649806b
commit
21c2d75d07
11 changed files with 304 additions and 299 deletions
|
|
@ -26,20 +26,19 @@ const (
|
|||
|
||||
type Session interface {
|
||||
// Return whether the string is a valid expression.
|
||||
InputParses(string) (ParseResult, error)
|
||||
ExecInput(string, chan interface{}, int)
|
||||
ToText(interface{}) string
|
||||
ToggleDebug()
|
||||
Parse(string) (ParseResult, error)
|
||||
Execute(string, chan interface{}, int)
|
||||
Format(interface{}) string
|
||||
Debug(bool)
|
||||
}
|
||||
|
||||
type HTTP interface {
|
||||
// Return whether the string is a valid expression.
|
||||
InputParses(string) (ParseResult, error)
|
||||
Parse(string) (ParseResult, error)
|
||||
// Runs the query and returns individual results on the channel.
|
||||
ExecInput(string, chan interface{}, int)
|
||||
GetQuery(string, chan map[string]interface{})
|
||||
BuildJSON(interface{})
|
||||
GetJSON() ([]interface{}, error)
|
||||
ClearJSON()
|
||||
ToggleDebug()
|
||||
Execute(string, chan interface{}, int)
|
||||
ShapeOf(string) (interface{}, error)
|
||||
Collate(interface{})
|
||||
Results() (interface{}, error)
|
||||
Clear()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue