Documentation
¶
Index ¶
- Constants
- Variables
- func Connect(dataBase, collection string) (*mgo.Session, *mgo.Collection)
- func Count(db, collection string, query interface{}) (int, error)
- func DeepCopy(val interface{}, newVal interface{})
- func FindAll(db, collection string, selector, result interface{}) error
- func FindIter(db, collection string, selector interface{}) (*mgo.Iter, *mgo.Session)
- func FindOne(db, collection string, selector, result interface{}) error
- func Index(db, collection string, keys []string) error
- func Insert(db, collection string, docs interface{}) error
- func IsEmpty(db, collection string) bool
- func KeyIsExist(db, collection, key, value string) bool
- func NextVal(db, countername string) int32
- func Remove(db, collection string, selector interface{}) error
- func Update(db, collection string, selector, update interface{}) error
- func Upsert(db, collection string, selector, update interface{}) error
- type Counter
- type M
Constants ¶
View Source
const ( DEFAULT_MGO_TIMEOUT = 15 DEFAULT_MGO_ADDR = "127.0.0.1:27017" )
Variables ¶
View Source
var (
ErrNotFound = mgo.ErrNotFound
)
Functions ¶
func FindIter ¶
func FindIter(db, collection string, selector interface{}) (*mgo.Iter, *mgo.Session)
func KeyIsExist ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.