Query executes the given query on the database.
(q *query.Query, local, internal bool)
| 179 | |
| 180 | // Query executes the given query on the database. |
| 181 | func (c *Controller) Query(q *query.Query, local, internal bool) (*iterator.Iterator, error) { |
| 182 | if shuttingDown.IsSet() { |
| 183 | return nil, ErrShuttingDown |
| 184 | } |
| 185 | |
| 186 | it, err := c.storage.Query(q, local, internal) |
| 187 | if err != nil { |
| 188 | return nil, err |
| 189 | } |
| 190 | |
| 191 | return it, nil |
| 192 | } |
| 193 | |
| 194 | // PushUpdate pushes a record update to subscribers. |
| 195 | // The caller must hold the record's lock when calling |