MCPcopy
hub / github.com/safing/portmaster / Query

Method Query

base/database/interface.go:526–542  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

524// Will not see data that is in the write cache, waiting to be written.
525// Use with care with caching.
526func (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.

Callers

nothing calls this directly

Calls 4

getControllerFunction · 0.85
DatabaseNameMethod · 0.65
QueryMethod · 0.65
CheckMethod · 0.45

Tested by

no test coverage detected