goMongo

package module
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

goMongo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Strval

func Strval(value interface{}) string

Strval 获取变量的字符串值 浮点型 3.0将会转换成字符串3, "3" 非数值或字符类型的变量将会被转换成JSON格式字符串

Types

type FO added in v1.0.6

type FO struct {
	Filter Filter `json:"filter" bson:"filter"`
	Option Option `json:"option" bson:"option"`
}

type FU added in v1.0.6

type FU struct {
	Filter Filter `json:"filter" bson:"filter"`
	UData  UData  `json:"uData" bson:"uData"`
}

type Filter added in v1.0.4

type Filter struct {
	FMap map[string]interface{} `json:"fMap" bson:"fMap"`
	Type string                 `json:"type" bson:"type"`
}

type GoMongo added in v1.0.4

type GoMongo struct {
	Addr     string
	Port     string
	Password string
	User     string
	Pass     string
	Db       string
	Client   *mongo.Client
	Collect  *mongo.Collection
}

func (*GoMongo) AddMany added in v1.0.4

func (goMongo *GoMongo) AddMany(data []interface{}) *goCommon.Resp

func (*GoMongo) AddOne added in v1.0.4

func (goMongo *GoMongo) AddOne(data interface{}) *goCommon.Resp

func (*GoMongo) CloseConn added in v1.0.4

func (goMongo *GoMongo) CloseConn() *goCommon.Resp

func (*GoMongo) Connect added in v1.0.4

func (goMongo *GoMongo) Connect() *goCommon.Resp

func (*GoMongo) Count added in v1.0.4

func (goMongo *GoMongo) Count(data *Filter) *goCommon.Resp

func (*GoMongo) DeleteMany added in v1.0.4

func (goMongo *GoMongo) DeleteMany(data *Filter) *goCommon.Resp

func (*GoMongo) DeleteOne added in v1.0.4

func (goMongo *GoMongo) DeleteOne(data *Filter) *goCommon.Resp

func (*GoMongo) Distinct added in v1.0.4

func (goMongo *GoMongo) Distinct(data *Filter, field string) *goCommon.Resp

func (*GoMongo) GetMany added in v1.0.4

func (goMongo *GoMongo) GetMany(data *Filter, option *Option) *goCommon.Resp

func (*GoMongo) GetOne added in v1.0.4

func (goMongo *GoMongo) GetOne(data *Filter) *goCommon.Resp

func (*GoMongo) Ping added in v1.0.4

func (goMongo *GoMongo) Ping() *goCommon.Resp

func (*GoMongo) SetCollection added in v1.0.4

func (goMongo *GoMongo) SetCollection(coll string) *goCommon.Resp

func (*GoMongo) UpdateMany added in v1.0.4

func (goMongo *GoMongo) UpdateMany(data *Filter, uData *UData) *goCommon.Resp

func (*GoMongo) UpdateOne added in v1.0.4

func (goMongo *GoMongo) UpdateOne(data *Filter, uData *UData) *goCommon.Resp

type Option added in v1.0.4

type Option struct {
	Limit int64                  `json:"limit" bson:"limit"`
	Skip  int64                  `json:"skip" bson:"skip"`
	SMap  map[string]interface{} `json:"sMap" bson:"sMap"`
}

type UData added in v1.0.4

type UData struct {
	UMap map[string]interface{} `json:"uMap" bson:"uMap"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL