Documentation ¶
Index ¶
- Constants
- type Collection
- func (c *Collection) Aggregate(ctx context.Context, pipeline interface{}, results interface{}) error
- func (c *Collection) Count(ctx context.Context) (int64, error)
- func (c *Collection) DeleteMany(ctx context.Context) error
- func (c *Collection) DeleteOne(ctx context.Context) error
- func (c *Collection) Find(ctx context.Context, results interface{}) error
- func (c *Collection) FindOne(ctx context.Context, result interface{}) error
- func (c *Collection) FindOneOrZero(ctx context.Context, result interface{}) error
- func (c *Collection) InsertMany(ctx context.Context, documents []interface{}) error
- func (c *Collection) InsertOne(ctx context.Context, document interface{}) (primitive.ObjectID, error)
- func (c *Collection) Limit(limit int64) *Collection
- func (c *Collection) Skip(skip int64) *Collection
- func (c *Collection) Sort(sorts ...S) *Collection
- func (c *Collection) UpdateMany(ctx context.Context, update interface{}) error
- func (c *Collection) UpdateOne(ctx context.Context, update interface{}) error
- func (c *Collection) Upsert(ctx context.Context, update interface{}) error
- func (c *Collection) Where(filters ...F) *Collection
- func (c *Collection) WhereAnd(filter F) *Collection
- func (c *Collection) WhereOr(filter F) *Collection
- type Database
- type F
- type K
- func (k K) Asc() S
- func (k K) Desc() S
- func (k K) Eq(value interface{}) F
- func (k K) Exists(value bool) F
- func (k K) Gt(value interface{}) F
- func (k K) Gte(value interface{}) F
- func (k K) In(value interface{}) F
- func (k K) Lt(value interface{}) F
- func (k K) Lte(value interface{}) F
- func (k K) Ne(value interface{}) F
- func (k K) Nin(value interface{}) F
- func (k K) Proj() Proj
- func (k K) Regex(value string) F
- func (k K) Set(v interface{}) U
- type Proj
- type S
- type U
Constants ¶
View Source
const (
NoUse int64 = -1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { *mongo.Collection // contains filtered or unexported fields }
func (*Collection) Aggregate ¶
func (c *Collection) Aggregate(ctx context.Context, pipeline interface{}, results interface{}) error
func (*Collection) DeleteMany ¶
func (c *Collection) DeleteMany(ctx context.Context) error
func (*Collection) FindOne ¶
func (c *Collection) FindOne(ctx context.Context, result interface{}) error
func (*Collection) FindOneOrZero ¶
func (c *Collection) FindOneOrZero(ctx context.Context, result interface{}) error
func (*Collection) InsertMany ¶
func (c *Collection) InsertMany(ctx context.Context, documents []interface{}) error
func (*Collection) Limit ¶
func (c *Collection) Limit(limit int64) *Collection
func (*Collection) Skip ¶
func (c *Collection) Skip(skip int64) *Collection
func (*Collection) Sort ¶
func (c *Collection) Sort(sorts ...S) *Collection
func (*Collection) UpdateMany ¶
func (c *Collection) UpdateMany(ctx context.Context, update interface{}) error
func (*Collection) UpdateOne ¶
func (c *Collection) UpdateOne(ctx context.Context, update interface{}) error
func (*Collection) Upsert ¶
func (c *Collection) Upsert(ctx context.Context, update interface{}) error
func (*Collection) Where ¶
func (c *Collection) Where(filters ...F) *Collection
func (*Collection) WhereAnd ¶
func (c *Collection) WhereAnd(filter F) *Collection
func (*Collection) WhereOr ¶
func (c *Collection) WhereOr(filter F) *Collection
type Database ¶
func NewDatabase ¶
func (*Database) Collection ¶
func (db *Database) Collection(name string) *Collection
Click to show internal directories.
Click to hide internal directories.