I found this problem before, but I’m not sure how to modify it. The
reason is:
Lua table index is begin from 1, but array in mongodb is 0. So there
will be a
undefined element in mongodb array whose index is 0.
If we modify the driver to make index=index-1 when insert into mongodb
and
index=index+1 when read from mongodb, the “undefined” will be
eliminated.
We will found that the tab[1]=aa inserted into mongodb will be tab[0]=aa
actual
stored in mongodb, and it’s conflict with other language drivers.
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.