MCPcopy
hub / github.com/uber/aresdb / NewQuery

Function NewQuery

query/sql/tree/Query.go:34–46  ·  view source on GitHub ↗

NewQuery creates Query

(location *NodeLocation, with *With, queryBody IQueryBody, order *OrderBy, limit string)

Source from the content-addressed store, hash-verified

32
33// NewQuery creates Query
34func NewQuery(location *NodeLocation, with *With, queryBody IQueryBody, order *OrderBy, limit string) *Query {
35 if queryBody == nil {
36 panic(fmt.Errorf("QueryBody is null at (line:%d, col:%d)", location.Line, location.CharPosition))
37 }
38
39 return &Query{
40 IStatement: NewStatement(location),
41 QueryBody: queryBody,
42 With: with,
43 OrderBy: order,
44 Limit: limit,
45 }
46}
47
48// Accept accepts visitor
49func (n *Query) Accept(visitor AstVisitor, ctx interface{}) interface{} {

Callers 2

VisitQueryMethod · 0.92
VisitQueryNoWithMethod · 0.92

Calls 2

NewStatementFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected