Documentation ¶
Index ¶
- type Builder
- type DeleteExecutor
- type Entity
- type FinderExecutor
- func (f *FinderExecutor[T]) All(ctx context.Context) ([]T, error)
- func (f *FinderExecutor[T]) Filter(filter ...primitive.E) *FinderExecutor[T]
- func (f *FinderExecutor[T]) Limit(l int64) *FinderExecutor[T]
- func (f *FinderExecutor[T]) One(ctx context.Context) (T, error)
- func (f *FinderExecutor[T]) Skip(s int64) *FinderExecutor[T]
- func (f *FinderExecutor[T]) SortAsc(field string) *FinderExecutor[T]
- func (f *FinderExecutor[T]) SortDesc(field string) *FinderExecutor[T]
- type InsertExecutor
- type Op
- type Predicate
- func And(pp ...*Predicate) *Predicate
- func EQ(field string, value interface{}) *Predicate
- func GT(field string, value interface{}) *Predicate
- func GTE(field string, value interface{}) *Predicate
- func In(field string, value ...interface{}) *Predicate
- func LT(field string, value interface{}) *Predicate
- func LTE(field string, value interface{}) *Predicate
- func NEQ(field string, value interface{}) *Predicate
- func Nor(pp ...*Predicate) *Predicate
- func NotIn(field string, value ...interface{}) *Predicate
- func Or(pp ...*Predicate) *Predicate
- func P(fns ...func(*Builder)) *Predicate
- func (p *Predicate) EQ(field string, value interface{}) *Predicate
- func (p *Predicate) GT(field string, value interface{}) *Predicate
- func (p *Predicate) GTE(field string, value interface{}) *Predicate
- func (p *Predicate) In(field string, value ...interface{}) *Predicate
- func (p *Predicate) LT(field string, value interface{}) *Predicate
- func (p *Predicate) LTE(field string, value interface{}) *Predicate
- func (p *Predicate) NEQ(field string, value interface{}) *Predicate
- func (p *Predicate) Not(field string, p2 *Predicate) *Predicate
- func (p *Predicate) NotIn(field string, value ...interface{}) *Predicate
- func (p *Predicate) Query() bson.D
- type UpdateExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteExecutor ¶ added in v0.2.2
type DeleteExecutor[T Entity] struct { // contains filtered or unexported fields }
func NewDeleteExecutor ¶ added in v0.2.2
func NewDeleteExecutor[T Entity](col *mongo.Collection) *DeleteExecutor[T]
type FinderExecutor ¶ added in v0.2.2
type FinderExecutor[T Entity] struct { // contains filtered or unexported fields }
func NewFinderExecutor ¶ added in v0.2.2
func NewFinderExecutor[T Entity](col *mongo.Collection) *FinderExecutor[T]
func (*FinderExecutor[T]) All ¶ added in v0.2.2
func (f *FinderExecutor[T]) All(ctx context.Context) ([]T, error)
func (*FinderExecutor[T]) Filter ¶ added in v0.2.2
func (f *FinderExecutor[T]) Filter(filter ...primitive.E) *FinderExecutor[T]
func (*FinderExecutor[T]) Limit ¶ added in v0.2.2
func (f *FinderExecutor[T]) Limit(l int64) *FinderExecutor[T]
func (*FinderExecutor[T]) One ¶ added in v0.2.2
func (f *FinderExecutor[T]) One(ctx context.Context) (T, error)
func (*FinderExecutor[T]) Skip ¶ added in v0.2.2
func (f *FinderExecutor[T]) Skip(s int64) *FinderExecutor[T]
func (*FinderExecutor[T]) SortAsc ¶ added in v0.2.2
func (f *FinderExecutor[T]) SortAsc(field string) *FinderExecutor[T]
func (*FinderExecutor[T]) SortDesc ¶ added in v0.2.2
func (f *FinderExecutor[T]) SortDesc(field string) *FinderExecutor[T]
type InsertExecutor ¶ added in v0.2.2
type InsertExecutor[T Entity] struct { // contains filtered or unexported fields }
func NewInsertExecutor ¶ added in v0.2.2
func NewInsertExecutor[T Entity](col *mongo.Collection) *InsertExecutor[T]
func (*InsertExecutor[T]) Save ¶ added in v0.2.2
func (i *InsertExecutor[T]) Save(ctx context.Context) error
func (*InsertExecutor[T]) SetItem ¶ added in v0.2.2
func (i *InsertExecutor[T]) SetItem(u ...T) *InsertExecutor[T]
type UpdateExecutor ¶ added in v0.2.2
type UpdateExecutor[T Entity] struct { // contains filtered or unexported fields }
func NewUpdateExecutor ¶ added in v0.2.2
func NewUpdateExecutor[T Entity](col *mongo.Collection) *UpdateExecutor[T]
func (*UpdateExecutor[T]) Set ¶ added in v0.2.2
func (u *UpdateExecutor[T]) Set(name string, arg any) *UpdateExecutor[T]
Click to show internal directories.
Click to hide internal directories.