Documentation ¶
Index ¶
- Constants
- type A
- type Config
- type Conn
- func (conn *Conn) Close(ctx Context) error
- func (conn *Conn) CountDocuments(ctx Context, collection string, filter M) (int64, error)
- func (conn *Conn) CreateCollection(ctx Context, collection string, opts ...*options.CreateCollectionOptions) error
- func (conn *Conn) CreateIndexes(ctx Context, collection string, opts []mongo.IndexModel) error
- func (conn *Conn) Database() *mongo.Database
- func (conn *Conn) DeleteByID(ctx Context, collection string, id PK) error
- func (conn *Conn) DeleteMany(ctx Context, collection string, filter M) error
- func (conn *Conn) DeleteOne(ctx Context, collection string, filter M) error
- func (conn *Conn) Exists(ctx Context, collection string, filter M) (ok bool, err error)
- func (conn *Conn) FindAll(ctx Context, collection string, dst interface{}, filter M, ...) error
- func (conn *Conn) FindByID(ctx Context, collection string, id PK, dst interface{}) (ok bool, err error)
- func (conn *Conn) FindOne(ctx Context, collection string, filter M, dst interface{}, ...) (ok bool, err error)
- func (conn *Conn) InsertOne(ctx Context, collection string, document interface{}, returnID *PK) error
- func (conn *Conn) Migrate(ctx Context, migrations map[int]Migration) error
- func (conn *Conn) MigrateTo(ctx Context, migrations map[int]Migration, targetNumber int) error
- func (conn *Conn) UpdateByID(ctx Context, collection string, id PK, update interface{}) error
- func (conn *Conn) UpdateMany(ctx Context, collection string, filter M, update interface{}) error
- func (conn *Conn) UpdateOne(ctx Context, collection string, filter M, update interface{}) error
- type Context
- type M
- type Migration
- type PK
Constants ¶
View Source
const ( EQ = "$eq" NE = "$ne" GT = "$gt" GE = "$gte" LT = "$lt" LE = "$lte" REGEX = "$regex" EXISTS = "$exists" IN = "$in" OR = "$or" AND = "$and" SET = "$set" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) CountDocuments ¶
func (*Conn) CreateCollection ¶
func (*Conn) CreateIndexes ¶
func (*Conn) DeleteMany ¶
func (*Conn) UpdateByID ¶
func (*Conn) UpdateMany ¶
Click to show internal directories.
Click to hide internal directories.