This commit is contained in:
Coder12a 2018-11-16 21:23:14 -06:00
parent 1b06ca384a
commit 1f915850d9
2 changed files with 7 additions and 2 deletions

View File

@ -141,7 +141,7 @@ API
- **colddb.add_tag(db,name,tag)**
-
- Creates a folder from the given table in tag.
- **colddb.get_or_add_tag(db,name,tag) --> tag_name**

View File

@ -384,7 +384,11 @@ local function iterate(db,func_on_iterate,end_func,count,cs,args)
extended_api.Async.iterate(db.async_pool,1,count,function(i)
local line = fl:read("*l")
if args.do_not_skip_removed_items or not db.indexes_pool[cs].deleted_items[line] then
func_on_iterate(line,i,args)
local ar = func_on_iterate(line,i,args)
if ar then
args = ar
return args
end
end
end,function()
if end_func then
@ -454,6 +458,7 @@ function colddb.iterate_index_table(db,begin_func,func_on_iterate,end_func,args,
-- Start iterating the index table
iterate(db,func_on_iterate,end_func,c,cs,args)
elseif f and f.file then
local fl = f.file
-- If its iterating some other function then add this one to the queue list
fl:seek("set")
local c = tonumber(fl:read("*l"))