Documentation
¶
Index ¶
- Variables
- func All(source, predicate interface{}) bool
- func AllBy(source interface{}, properties map[string]interface{}) bool
- func Any(source, predicate interface{}) bool
- func AnyBy(source interface{}, properties map[string]interface{}) bool
- func Clone(source interface{}) interface{}
- func Each(source, iterator interface{})
- func Find(source, predicate interface{}) interface{}
- func FindBy(source interface{}, properties map[string]interface{}) interface{}
- func FindIndex(source, predicate interface{}) int
- func FindIndexBy(source interface{}, properties map[string]interface{}) int
- func First(source interface{}) interface{}
- func Group(source, keySelector interface{}) interface{}
- func GroupBy(source interface{}, property string) interface{}
- func Index(source, indexSelector interface{}) interface{}
- func IndexBy(source interface{}, property string) interface{}
- func IsArray(v interface{}) bool
- func IsMatch(item interface{}, properties map[string]interface{}) bool
- func Keys(source interface{}) interface{}
- func Last(source interface{}) interface{}
- func Map(source, selector interface{}) interface{}
- func Md5(plaintext string) string
- func Object(source interface{}) interface{}
- func Pluck(source interface{}, property string) interface{}
- func Property(name string) func(interface{}) (interface{}, error)
- func PropertyRV(name string) func(interface{}) (reflect.Value, error)
- func Range(start, stop, step int) []int
- func Reduce(source, iterator, memo interface{}) interface{}
- func Reject(source, predicate interface{}) interface{}
- func RejectBy(source interface{}, properties map[string]interface{}) interface{}
- func Size(source interface{}) int
- func Sort(source, selector interface{}) interface{}
- func SortBy(source interface{}, property string) interface{}
- func Take(source interface{}, count int) interface{}
- func ToRealValue(rv reflect.Value) interface{}
- func UUID() string
- func Uniq(source, selector interface{}) interface{}
- func UniqBy(source interface{}, property string) interface{}
- func Values(source interface{}) interface{}
- func Where(source, predicate interface{}) interface{}
- func WhereBy(source interface{}, properties map[string]interface{}) interface{}
- type Facade
- type IQuery
- type Query
- func (q *Query) All(predicate interface{}) IQuery
- func (q *Query) AllBy(properties map[string]interface{}) IQuery
- func (q *Query) Any(predicate interface{}) IQuery
- func (q *Query) AnyBy(properties map[string]interface{}) IQuery
- func (q *Query) AsParallel() IQuery
- func (q *Query) Clone() IQuery
- func (q *Query) Each(iterator interface{}) IQuery
- func (q *Query) Find(predicate interface{}) IQuery
- func (q *Query) FindBy(properties map[string]interface{}) IQuery
- func (q *Query) FindIndex(predicate interface{}) IQuery
- func (q *Query) FindIndexBy(properties map[string]interface{}) IQuery
- func (q *Query) First() IQuery
- func (q *Query) Group(keySelector interface{}) IQuery
- func (q *Query) GroupBy(property string) IQuery
- func (q *Query) Index(indexSelector interface{}) IQuery
- func (q *Query) IndexBy(property string) IQuery
- func (q *Query) Keys() IQuery
- func (q *Query) Last() IQuery
- func (q *Query) Map(selector interface{}) IQuery
- func (m *Query) Object() IQuery
- func (q *Query) Pluck(property string) IQuery
- func (q *Query) Range(start, stop, step int) IQuery
- func (q *Query) Reduce(iterator, memo interface{}) IQuery
- func (q *Query) Reject(predicate interface{}) IQuery
- func (q *Query) RejectBy(properties map[string]interface{}) IQuery
- func (q *Query) Size() IQuery
- func (q *Query) Sort(selector interface{}) IQuery
- func (q *Query) SortBy(property string) IQuery
- func (q *Query) Take(count int) IQuery
- func (q *Query) Uniq(selector interface{}) IQuery
- func (q *Query) UniqBy(property string) IQuery
- func (q *Query) Value() interface{}
- func (q *Query) Values() IQuery
- func (q *Query) Where(predicate interface{}) IQuery
- func (q *Query) WhereBy(properties map[string]interface{}) IQuery
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func All ¶
func All(source, predicate interface{}) bool
All of the values in the `source` pass the `predicate` truth test @source map or array @predicate func(value or item, key or index) bool
func AllBy ¶
AllBy will stop traversing the `source` if a false element is found @source map or array @properties map[string]interface{}
func Any ¶
func Any(source, predicate interface{}) bool
Any is if any of the values in the `source` pass the `predicate` truth test @source map or array @predicate func(value or item, key or index) bool
func AnyBy ¶
AnyBy will stop traversing the `source` if a true element is found @source map or array
func Clone ¶
func Clone(source interface{}) interface{}
Clone will create a deep-copied clone of the `source`
func Each ¶
func Each(source, iterator interface{})
Each will iterate over a list of elements @source map or array @iterator func(value or item, key or index) bool
func FindBy ¶
func FindBy(source interface{}, properties map[string]interface{}) interface{}
FindBy is 根据属性值获取元素
func FindIndexBy ¶
FindIndexBy is 根据字典获取下标
func Index ¶
func Index(source, indexSelector interface{}) interface{}
Index is 转化为indexSelector筛选出的值为key的map
func IndexBy ¶
func IndexBy(source interface{}, property string) interface{}
IndexBy is 转化为property值的map
func Pluck ¶
func Pluck(source interface{}, property string) interface{}
Pluck is 从source中取出所有property
func PropertyRV ¶
PropertyRV is 获取reflect.Value
Types ¶
type IQuery ¶
type IQuery interface {
All(interface{}) IQuery
AllBy(map[string]interface{}) IQuery
Any(interface{}) IQuery
AnyBy(map[string]interface{}) IQuery
AsParallel() IQuery
Clone() IQuery
Each(interface{}) IQuery
Find(interface{}) IQuery
FindBy(map[string]interface{}) IQuery
FindIndex(interface{}) IQuery
FindIndexBy(map[string]interface{}) IQuery
First() IQuery
Group(interface{}) IQuery
GroupBy(string) IQuery
Index(interface{}) IQuery
IndexBy(string) IQuery
Keys() IQuery
Last() IQuery
Map(interface{}) IQuery
Object() IQuery
Pluck(string) IQuery
Range(int, int, int) IQuery
Reduce(interface{}, interface{}) IQuery
Reject(interface{}) IQuery
RejectBy(map[string]interface{}) IQuery
Size() IQuery
Sort(interface{}) IQuery
SortBy(string) IQuery
Take(int) IQuery
Uniq(interface{}) IQuery
UniqBy(string) IQuery
Value() interface{}
Values() IQuery
Where(interface{}) IQuery
WhereBy(map[string]interface{}) IQuery
}
IQuery is interface
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query is a wrapper
func (*Query) FindIndexBy ¶
FindIndexBy is IQuery's method