NewQuery creates Query
(location *NodeLocation, with *With, queryBody IQueryBody, order *OrderBy, limit string)
| 32 | |
| 33 | // NewQuery creates Query |
| 34 | func 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 |
| 49 | func (n *Query) Accept(visitor AstVisitor, ctx interface{}) interface{} { |
no test coverage detected