Documentation ¶
Index ¶
- type JSONQ
- func (j *JSONQ) Avg(property ...string) float64
- func (j *JSONQ) Count() (lnth int)
- func (j *JSONQ) Error() error
- func (j *JSONQ) Errors() []error
- func (j *JSONQ) File(filename string) *JSONQ
- func (j *JSONQ) Find(path string) interface{}
- func (j *JSONQ) First() interface{}
- func (j *JSONQ) From(node string) *JSONQ
- func (j *JSONQ) Get() interface{}
- func (j *JSONQ) GroupBy(property string) *JSONQ
- func (j *JSONQ) JSONString(json string) *JSONQ
- func (j *JSONQ) Last() interface{}
- func (j *JSONQ) Macro(operator string, fn QueryFunc) *JSONQ
- func (j *JSONQ) Max(property ...string) float64
- func (j *JSONQ) Min(property ...string) float64
- func (j *JSONQ) Nth(index int) interface{}
- func (j *JSONQ) Only(properties ...string) *JSONQ
- func (j *JSONQ) OrWhere(key, cond string, val interface{}) *JSONQ
- func (j *JSONQ) Pluck(property string) interface{}
- func (j *JSONQ) Reader(r io.Reader) *JSONQ
- func (j *JSONQ) Reset() *JSONQ
- func (j *JSONQ) Sort(order ...string) *JSONQ
- func (j *JSONQ) SortBy(order ...string) *JSONQ
- func (j *JSONQ) String() string
- func (j *JSONQ) Sum(property ...string) float64
- func (j *JSONQ) Where(key, cond string, val interface{}) *JSONQ
- func (j *JSONQ) WhereContains(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereEndsWith(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereEqual(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereIn(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereNil(key string) *JSONQ
- func (j *JSONQ) WhereNotEqual(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereNotIn(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereNotNil(key string) *JSONQ
- func (j *JSONQ) WhereStartsWith(key string, val interface{}) *JSONQ
- func (j *JSONQ) WhereStrictContains(key string, val interface{}) *JSONQ
- type QueryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONQ ¶
type JSONQ struct {
// contains filtered or unexported fields
}
JSONQ describes a JSONQ type which contains all the state
func (*JSONQ) Count ¶
Count return the result total items count. Note: this could be a length of list/array/map
func (*JSONQ) From ¶
From seek the json content to provided node. e.g: "users.[0]" or "users.[0].name"
func (*JSONQ) GroupBy ¶
GroupBy build a chunk of exact matched data in a group list using provided attribute/column/property
func (*JSONQ) JSONString ¶
JSONString read the json content from valid json string
func (*JSONQ) Pluck ¶
Pluck pluck a property from a list of objects and return a slice of interface{}
func (*JSONQ) Reset ¶
Reset reset the current state of JSON instance and make a fresh object with the original json content
func (*JSONQ) Sort ¶
Sort sort an array or an array // default ascending order. pass "desc" for descending order
func (*JSONQ) SortBy ¶
SortBy sort an array // default ascending order. pass "desc" for descending order
func (*JSONQ) WhereContains ¶
WhereContains satisfy Where clause which contains provided value(string)
func (*JSONQ) WhereEndsWith ¶
WhereEndsWith satisfy Where clause which ends with provided value(string)
func (*JSONQ) WhereEqual ¶
WhereEqual is an alias of Where("key", "=", val)
func (*JSONQ) WhereNotEqual ¶
WhereNotEqual is an alias of Where("key", "!=", val)
func (*JSONQ) WhereNotIn ¶
WhereNotIn is an alias for where('key', 'notIn', []string{"a", "b"})
func (*JSONQ) WhereNotNil ¶
WhereNotNil is an alias of Where("key", "!=", nil)
func (*JSONQ) WhereStartsWith ¶
WhereStartsWith satisfy Where clause which starts with provided value(string)
func (*JSONQ) WhereStrictContains ¶
WhereStrictContains satisfy Where clause which contains provided value(string). Note this will case sensitive