Documentation ¶
Index ¶
- Constants
- type Service
- func (r *Service) Aggregate(ctx context.Context, collname string, pipeline []map[string]interface{}, ...) error
- func (r *Service) CountDocuments(ctx context.Context, collname string, filter map[string]interface{}) (int64, error)
- func (r *Service) CreateMany(ctx context.Context, collname string, recs ...interface{}) error
- func (r *Service) CreateOne(ctx context.Context, collname string, rec interface{}) error
- func (r *Service) FindOne(ctx context.Context, collname string, value interface{}, ...) error
- func (r *Service) FindOneAndDelete(ctx context.Context, collname string, filter map[string]interface{}, ...) error
- func (r *Service) List(ctx context.Context, collname string, recs interface{}, ...) (*abstr.Page, error)
- func (r *Service) Pull(ctx context.Context, collname string, filter map[string]interface{}, ...) error
- func (r *Service) RemoveMany(ctx context.Context, collname string, filter map[string]interface{}) error
- func (r *Service) Unmark(ctx context.Context, collname string, filter map[string]interface{}, ...) error
- func (r *Service) UpdateMany(ctx context.Context, collname string, filter interface{}, value interface{}) (*mongo.UpdateResult, error)
- func (r *Service) UpdateOne(ctx context.Context, collname string, filter map[string]interface{}, ...) error
- func (r *Service) UpdateOneMore(ctx context.Context, collname string, filter map[string]interface{}, ...) error
Constants ¶
View Source
const ( MsgFindFailed = "find failed, deadline exceeded" FmtErrFindFailed = "can not find in %ss" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CountDocuments ¶
func (*Service) CreateMany ¶
func (*Service) FindOneAndDelete ¶
func (*Service) RemoveMany ¶
func (*Service) UpdateMany ¶
func (*Service) UpdateOneMore ¶
func (r *Service) UpdateOneMore(ctx context.Context, collname string, filter map[string]interface{}, value interface{}, options ...abstr.FindOption) error
UpdateOneMore 允许在外部使用 $set 之外的操作符
Click to show internal directories.
Click to hide internal directories.