Documentation ¶
Index ¶
- func Filter(record int, filter ast.Node) (bool, error)
- type Accessor
- type Accessors
- type BooleanGetter
- type Card
- type Dataset
- func (d Dataset[T, D]) IsBoolean(raw ast.Node) bool
- func (d Dataset[T, D]) IsFailure(n ast.Node) (error, bool)
- func (d Dataset[T, D]) IsNumber(raw ast.Node) bool
- func (d Dataset[T, D]) IsString(raw ast.Node) bool
- func (d Dataset[T, D]) MatchAll(m ast.Node) (or ast.Or)
- func (d Dataset[T, D]) Query(query string) (*QueryResult[T], error)
- func (d Dataset[T, D]) StringFrom(n ast.Node) (ast.Node, bool)
- func (d Dataset[T, D]) Transform(src ast.Query) ast.Node
- type EqualNumber
- type EqualString
- type Facet
- type FacetRetriever
- type FacetRetrievers
- type GreaterThanNumber
- type GreaterThanString
- type Invalid
- type LessThanNumber
- type LessThanString
- type NumberGetter
- type NumberRanges
- type QueryResult
- type Sorter
- type Sorters
- type StringFacet
- type StringGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BooleanGetter ¶
func (BooleanGetter) String ¶
func (n BooleanGetter) String() string
type Dataset ¶
type Dataset[T any, D ~[]T] struct { Source D Accessors Accessors Facets func(D, int) []Facet Sorters Sorters[T] }
type EqualNumber ¶
type EqualString ¶
type FacetRetriever ¶
type FacetRetriever interface {
Bucket() bucket
}
type FacetRetrievers ¶
type FacetRetrievers[T any] []FacetRetriever
func (FacetRetrievers[T]) Facets ¶
func (f FacetRetrievers[T]) Facets(result []T, topN int) (facets []Facet)
type GreaterThanNumber ¶
type GreaterThanString ¶
type LessThanNumber ¶
type LessThanString ¶
type NumberGetter ¶
func (NumberGetter) String ¶
func (n NumberGetter) String() string
type NumberRanges ¶ added in v0.2.0
type NumberRanges struct { Getter func(int) float64 Field string Name string Duration bool Size bool TimeAgo bool }
func (NumberRanges) Bucket ¶ added in v0.2.0
func (s NumberRanges) Bucket() bucket
type QueryResult ¶
type Sorter ¶
type StringFacet ¶
func (StringFacet) Bucket ¶
func (s StringFacet) Bucket() bucket
Click to show internal directories.
Click to hide internal directories.