Database record is not updated
function updateMap(r,a,b,c)
if not aerospike:exists(r) then
local ret = map()
ret['status'] = 'DOES NOT EXIST'
return ret
end
if r.void2 == nil then
r.void2 = map()
end
if r.void2[a] == nil then
r.void2[a] = map()
end
if r.void2[a][b] == nil then
r.void2[a][b] = map()
end
if r.void2[a][b][c] == nil then
r.void2[a][b][c] = list{1, os.time(os.date("!*t"))}
return r.void2[a]
end
r.void2[a][b][c][1] = r.void2[a][b][c][1] + 1
r.void2[a][b][c][2] = os.time(os.date("!*t"))
aerospike:update(r)
return r.void2[a]
end
execute example.updateMap(‘55’,‘540’,‘30’) on test.testing where PK=‘xyz’
+---------------------------------------+
| updateMap |
+---------------------------------------+
| MAP('{"540":{"30":[2, 1620664860]}}') |
+---------------------------------------+
1 row in set (0.001 secs)