Query executes the given query on the database. Will not see data that is in the write cache, waiting to be written. Use with care with caching.
(q *query.Query)
| 524 | // Will not see data that is in the write cache, waiting to be written. |
| 525 | // Use with care with caching. |
| 526 | func (i *Interface) Query(q *query.Query) (*iterator.Iterator, error) { |
| 527 | _, err := q.Check() |
| 528 | if err != nil { |
| 529 | return nil, err |
| 530 | } |
| 531 | |
| 532 | db, err := getController(q.DatabaseName()) |
| 533 | if err != nil { |
| 534 | return nil, err |
| 535 | } |
| 536 | |
| 537 | // TODO: Finish caching system integration. |
| 538 | // Flush the cache before we query the database. |
| 539 | // i.FlushCache() |
| 540 | |
| 541 | return db.Query(q, i.options.Local, i.options.Internal) |
| 542 | } |
| 543 | |
| 544 | // Purge deletes all records that match the given query. It returns the number |
| 545 | // of successful deletes and an error. |
nothing calls this directly
no test coverage detected