tmongo

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache struct {
	// 设置
	Set *tmongoSetting
	// 数据库
	Db *mgo.Database
}

Functions

func Find

func Find(v interface{}, query interface{}) error

查询数据

func History

func History(v interface{}, id bson.ObjectId) error

func HistoryList

func HistoryList(v interface{}, id bson.ObjectId, list interface{}) error

func Insert

func Insert(v interface{}) error

插入数据

func Page

func Page(pageNo int, pageSize int, selector interface{}, list interface{}) (int, error)

分页查询

func RemoveId

func RemoveId(id bson.ObjectId, v interface{}) error

删除数据

func Update

func Update(v interface{}, id bson.ObjectId, keys ...string) error

修改数据

Types

type Tmm

type Tmm struct {
	// contains filtered or unexported fields
}

func (*Tmm) Check

func (m *Tmm) Check() error

检查是否有效

Jump to

Keyboard shortcuts

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