Documentation ¶
Overview ¶
Package filter provides structures that represent filters. This package is primarily used by driver implementors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
Conditions []Condition
}
Filter is a collection of zero or more conditions. A filter with no conditions does not match any documents.
type HasKeys ¶
type HasKeys struct {
Values Set
}
HasKeys is a condition that matches documents that have all of a given set of keys.
type HasUniqueKeyIn ¶
type HasUniqueKeyIn struct {
Values Set
}
HasUniqueKeyIn is a condition that matches documents with unique keys in given set.
func (*HasUniqueKeyIn) Accept ¶
func (c *HasUniqueKeyIn) Accept(v Visitor) (bool, error)
Accept calls v.HasUniqueKeyIn(c).
func (*HasUniqueKeyIn) IsSatisfiedBy ¶
func (c *HasUniqueKeyIn) IsSatisfiedBy(doc *document.Document) bool
IsSatisfiedBy returns true if doc meets this condition.
type IsOneOf ¶
type IsOneOf struct {
Values Set
}
IsOneOf is a condition that matches documents with IDs in a specific set.
type Set ¶
type Set map[string]struct{}
Set is a set of strings.
func (Set) IntersectInPlace ¶
IntersectInPlace updates s to the intersection of x and itself.
func (Set) UnionInPlace ¶
UnionInPlace updates s to the union of x and itself.