Welcome! Log In Create A New Profile

Advanced

Re: lua-resty-mongol - table insertion

Pierre
May 22, 2012 08:56AM
to be more precise, issue can be only

reproduced when trying to
insert table of tables

On Tue, 22 May 2012 12:59:29 +0200, Pierre
wrote:

> Hi list,
>
> I'm currently moving into lua-resty-mongol, and
I'm facing this issue:
>
> local versions = {}
> local t = {}
>
table.insert(t,{a = "aa"})
> table.insert(t,{b = "bb"})
>
versions={{name="dog",container="mycontainer",tab= t}}
>
> mongos>
db.files.find({container:'mycontainer'}).pretty()
> {
> "_id" :
ObjectId("4fbb710018b42f60c829ae87"),
> "container" : "mycontainer",
>
"tab" : [
> undefined,
> {
> "a" : "aa"
> },
> {
> "b" : "bb"
> }
> ],
>
"name" : "dog"
> }
>
> Why is ther "undefined" field ?
>
> Also,
pushing new info to "tab" results in resetting "tab" into new array
of:
> [
> undefined,
> {
> "c" : "cc"
> }
> ]
>
> Did I do anything
wrong or is this a bug ?
>
> Pierre
>
>
_______________________________________________
> nginx mailing list
>
nginx@nginx.org [1]
> http://mailman.nginx.org/mailman/listinfo/nginx
[2]



Links:
------
[1] mailto:nginx@nginx.org
[2]
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 172
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