Documentation ¶
Index ¶
- func Push(query *Query, filter interface{}) (ok bool, err error)
- func WithContext(ctx context.Context, q *Query) (withQuery context.Context)
- type Callback
- type Callbacks
- type Limit
- type Limiter
- type OnClose
- type OnDecode
- type Preload
- type Preloader
- type Query
- func (q *Query) And(elem primitive.M) (query *Query)
- func (q *Query) Empty() (isEmpty bool)
- func (q *Query) Limiter() (limit *int64)
- func (q *Query) M() (m primitive.M)
- func (q *Query) OnClose() (callbacks Callbacks)
- func (q *Query) OnCreate() (callbacks Callbacks)
- func (q *Query) OnDecode() (callbacks Callbacks)
- func (q *Query) Preloader() (preloads []string, ok bool)
- func (q *Query) Skipper() (skip *int64)
- func (q *Query) Sorter() (sort interface{})
- func (q *Query) Updater() (update primitive.M, err error)
- type Skip
- type Skipper
- type Sort
- type Sorter
- type Update
- type Updater
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limiter ¶
type Limiter interface {
Limit() (limit *int64)
}
Limiter is a filter to limit the result
type Preloader ¶
type Preloader interface {
Preload() (preloads []string)
}
Preloader is a filter to skip the result
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query is an enchanched primitive.M map
func GetFromContext ¶ added in v2.0.8
GetFromContext function extracts the request data from context
func (*Query) OnClose ¶ added in v2.0.8
OnClose callback is called after the mongox ends a loading procedure
func (*Query) OnCreate ¶ added in v2.0.10
OnCreate callback is called if the mongox creates a new document instance during loading
func (*Query) OnDecode ¶ added in v2.0.7
OnDecode callback is called after the mongo decode function
type Skipper ¶
type Skipper interface {
Skip() (skip *int64)
}
Skipper is a filter to skip the result
Click to show internal directories.
Click to hide internal directories.