mirror of
https://github.com/safing/portbase
synced 2025-09-10 15:34:26 +00:00
Finish minimal feature set, start with tests
This commit is contained in:
parent
3d60431376
commit
06a34f931e
34 changed files with 651 additions and 346 deletions
|
@ -3,6 +3,8 @@ package query
|
|||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/Safing/portbase/database/accessor"
|
||||
)
|
||||
|
||||
// And combines multiple conditions with a logical _AND_ operator.
|
||||
|
@ -16,9 +18,9 @@ type andCond struct {
|
|||
conditions []Condition
|
||||
}
|
||||
|
||||
func (c *andCond) complies(f Fetcher) bool {
|
||||
func (c *andCond) complies(acc accessor.Accessor) bool {
|
||||
for _, cond := range c.conditions {
|
||||
if !cond.complies(f) {
|
||||
if !cond.complies(acc) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue