Documentation ¶
Index ¶
- Constants
- func Count(dbName string, colName string, selector bson.M) (int, error)
- func ExistsCollection(dbName string, colName string) (bool, error)
- func ExistsDabatase(dbName string) (bool, error)
- func FindAll(dbName string, colName string, selector bson.M, typ reflect.Type) ([]interface{}, error)
- func FindId(dbName string, colName string, id interface{}) (interface{}, error)
- func FindList(dbName string, colName string, selector bson.M, typ reflect.Type, skip int, ...) ([]interface{}, int64, error)
- func FindOne(dbName string, colName string, selector bson.M) (interface{}, error)
- func Insert(dbName string, colName string, data interface{}) error
- func MustFindAll(dbName string, colName string, selector bson.M, typ reflect.Type) []interface{}
- func MustFindList(dbName string, colName string, selector bson.M, typ reflect.Type, skip int, ...) ([]interface{}, int64)
- func MustFindOne(dbName string, colName string, selector bson.M) interface{}
- func Ping() error
- func Remove(dbName string, colName string, selector bson.M) error
- func RemoveAll(dbName string, colName string, selector bson.M) (*mgo.ChangeInfo, error)
- func RemoveId(dbName string, colName string, id interface{}) error
- func Update(dbName string, colName string, selector bson.M, data interface{}) error
- func UpdateId(dbName string, colName string, id interface{}, data interface{}) error
- func Upsert(dbName string, colName string, selector bson.M, data interface{}) (*mgo.ChangeInfo, error)
- func UpsertId(dbName string, colName string, id interface{}, data interface{}) error
Constants ¶
View Source
const ( MGO_ADDRESSES = "localhost:27018" MGO_REPLICATE_SET_NAME = "" MGO_DATABASE = "DoubanBookApi" MGO_USERNAME = "docker" MGO_PASSWORD = "docker" )
Variables ¶
This section is empty.
Functions ¶
func ExistsDabatase ¶
func MustFindAll ¶
func MustFindList ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.