Documentation ¶
Index ¶
- func CountDocuments(sqltable core.SqlTable, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func DeleteMany(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func DeleteOne(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func Find(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func FindOne(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func FindOneAndDelete(sqltable core.SqlTable, filter interface{}, ...) *mongo.SingleResult
- func FindOneAndUpdate(sqltable core.SqlTable, filter interface{}, update interface{}, ...) *mongo.SingleResult
- func GetService() core.IService
- func InsertMany(sqltable core.SqlTable, data []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
- func InsertOne(sqltable core.SqlTable, data interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func OnInit(s core.IService, opt ...Option) (err error)
- func UpdateMany(sqltable core.SqlTable, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func UpdateOne(sqltable core.SqlTable, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- type Mongodb
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountDocuments ¶
func DeleteMany ¶
func DeleteMany(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func DeleteOne ¶
func DeleteOne(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func FindOne ¶
func FindOne(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func FindOneAndDelete ¶
func FindOneAndDelete(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult
func FindOneAndUpdate ¶
func FindOneAndUpdate(sqltable core.SqlTable, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
func GetService ¶
func InsertMany ¶
func InsertMany(sqltable core.SqlTable, data []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func InsertOne ¶
func InsertOne(sqltable core.SqlTable, data interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func UpdateMany ¶
func UpdateMany(sqltable core.SqlTable, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func UpdateOne ¶
func UpdateOne(sqltable core.SqlTable, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Types ¶
type Mongodb ¶
type Mongodb struct { Client *mongo.Client Database *mongo.Database // contains filtered or unexported fields }
func (*Mongodb) Collection ¶
func (this *Mongodb) Collection(sqltable core.SqlTable) *mongo.Collection
type Option ¶
type Option func(*Options)
func MaxPoolSize ¶
func MongodbDatabase ¶
func MongodbUrl ¶
Click to show internal directories.
Click to hide internal directories.