Welcome! Log In Create A New Profile

Advanced

Re: lua-resty-mongol - table insertion

May 23, 2012 02:22AM
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.

--
Best Regard.
Subject Author Posted

lua-resty-mongol - table insertion

Pierre May 22, 2012 07:00AM

Re: lua-resty-mongol - table insertion

Pierre May 22, 2012 08:56AM

Re: lua-resty-mongol - table insertion

bigplum May 23, 2012 02:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 196
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready