()
| 96 | } |
| 97 | |
| 98 | func (q *Query) clone() *Query { |
| 99 | x := *q |
| 100 | // Copy the contents of the slice-typed fields to a new backing store. |
| 101 | if len(q.filter) > 0 { |
| 102 | x.filter = make([]filter, len(q.filter)) |
| 103 | copy(x.filter, q.filter) |
| 104 | } |
| 105 | if len(q.order) > 0 { |
| 106 | x.order = make([]order, len(q.order)) |
| 107 | copy(x.order, q.order) |
| 108 | } |
| 109 | return &x |
| 110 | } |
| 111 | |
| 112 | // Ancestor returns a derivative query with an ancestor filter. |
| 113 | // The ancestor should not be nil. |
no outgoing calls
no test coverage detected