func Destroy(col *mgo.Collection, key int) error { return col.Remove(bson.M{keyfield: key}) }
func (executor *OpsExecutor) ExecRemove( content Document, coll *mgo.Collection) error { return coll.Remove(content["query"]) }
func DeleteByIdAndUserId2(collection *mgo.Collection, id, userId bson.ObjectId) bool { err := collection.Remove(GetIdAndUserIdBsonQ(id, userId)) return Err(err) }
func DeleteByIdAndUserId(collection *mgo.Collection, id, userId string) bool { err := collection.Remove(GetIdAndUserIdQ(id, userId)) return Err(err) }
// 删除一条 func Delete(collection *mgo.Collection, q interface{}) bool { err := collection.Remove(q) return Err(err) }
// Remove Account into Mongo func remove(u Account, s *mgo.Collection) { err := s.Remove(&u) if err != nil { panic(err) } }