Documentation ¶
Overview ¶
Package mapq provides aggregation and filtering functions for generic maps
Index ¶
- func Matches(a interface{}, op string, b interface{}) bool
- type Collection
- func (c Collection) Aggregate(key string, op string) float64
- func (c Collection) All(filter Filter) bool
- func (c Collection) Any(filter Filter) bool
- func (c Collection) Each(f func(m M) M) Collection
- func (c Collection) Filter(filter Filter) Collection
- func (c Collection) GroupBy(key string) Group
- func (c Collection) OrderBy(key string, order string) Collection
- func (c Collection) Slice() []map[string]interface{}
- type Filter
- type Group
- type M
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection []map[string]interface{}
func ToCollection ¶
func ToCollection(v interface{}) Collection
func (Collection) All ¶
func (c Collection) All(filter Filter) bool
func (Collection) Any ¶
func (c Collection) Any(filter Filter) bool
func (Collection) Each ¶
func (c Collection) Each(f func(m M) M) Collection
func (Collection) Filter ¶
func (c Collection) Filter(filter Filter) Collection
func (Collection) GroupBy ¶
func (c Collection) GroupBy(key string) Group
func (Collection) OrderBy ¶
func (c Collection) OrderBy(key string, order string) Collection
func (Collection) Slice ¶
func (c Collection) Slice() []map[string]interface{}
type Group ¶
func (Group) Each ¶
func (g Group) Each(f func(c Collection) Collection) Group
Click to show internal directories.
Click to hide internal directories.