reids 新增方法:
// 扫描所有KEY,返回所有符合pattern条件的数据,count为每次扫描数量
func ScanKeys(dbname string, pattern string, count int64)
// 扫描大的Hash表,返回所有符合pattern条件的数据,count为每次扫描数量
func ScanHashStrMap(dbname string, key string, pattern string, count int64)
// 扫描大的Hash表,返回所有符合pattern条件的数据,count为每次扫描数量
func ScanHashIntMap(dbname string, key string, pattern string, count int64)
// 根据key_format删除匹配的keys
func UnlinkKeysByFormat(dbname string, key_format string)
// 删除KEYS
func UnlinkKeys(dbname string, keys ...string)
mongodb 添加新方法
Action可以设置SlowTime(毫秒)和SlowLog,进行慢查询日志记录
// 使用主库查询
func (this Action) Master()
// 执行数据查询,按change返回处理结果
// Update更新数据 Remove查询后删除 ReturnNew返回更新后的数据
func (this Action) Apply(find bson.M, change ChangeData, data interface{})
// 创建索引
func (this Action) BuildIndex(tableName string, name string, keys []string, unique bool)
// 批量操作
func (this Action) Bulk(f func(bulk *mgo.Bulk))
// 查询所有数据,不返回总数据条数
func (this Action) FindAllNotCount(selector *Selector, data interface{})
// 多协程列表数据-根据查询条件自动分页获取所有数据 worker_count为协程数 once_limit为每次获取数据条数
func (this Action) Worker_ListAll(where bson.M, fields string, worker_count int, once_limit int, data interface{})
// 多协程列表数据-根据id列表获取所有数据 once_limit为每次获取数据条数
func (this Action) Worker_ListByIds(keyname string, list []string, fields string, once_limit int, data interface{})
// 多协程读取数据 // getwhere 获取每次查询的where条件 run_index 执行索引号从0开始 // check_worker_end 检查每个协程是否结束 get_count 为本次读取数据量 // worker_count 启动协程数量 // data 输出数据
func (this Action) Worker_ListData(getwhere func(run_index int) *Selector, check_worker_end func(get_count int) bool, worker_count int, data interface{})