summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/tablefield.lua
blob: 094560292895f9c37b5f2f203824319ddbb052a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local m = {}

function m:eachField(source, key, callback)
    if source.value then
        self:eachField(source.value, key, callback)
    end
end

function m:eachValue(source, callback)
    if source.value then
        self:eachValue(source.value, callback)
    end
end

function m:getValue(source)
    return source.value and self:getValue(source.value) or source
end

return m