Re: rds-json generate json with index key on first level of array

2013-02-26 Thread Mauro Stettler
Thanks for the reply agentzh, Ok, I'll probably implement this either on lua in the Nginx or on the client side inside the javascript then. Will have to do some tests of both solutions to decide. Regards, Mauro On Tue, Feb 26, 2013 at 4:03 AM, agentzh wrote: > Hello! > > On Mon, Feb 25, 2013

Re: rds-json generate json with index key on first level of array

2013-02-25 Thread agentzh
Hello! On Mon, Feb 25, 2013 at 12:56 AM, Mauro Stettler wrote: > Thanks, that would probably be possible. > > It's just that this URL is called very frequently, so I'm trying to do > everything as resource efficient as possible. I am worried that parsing the > json in lua in Nginx and reformatting

Re: rds-json generate json with index key on first level of array

2013-02-25 Thread Mauro Stettler
Thanks, that would probably be possible. It's just that this URL is called very frequently, so I'm trying to do everything as resource efficient as possible. I am worried that parsing the json in lua in Nginx and reformatting it would be too heavy on the server load. So I would have preferred if t

Re: rds-json generate json with index key on first level of array

2013-02-25 Thread smallfish
can use ngx_lua(openresty), filter/format the output. -- smallfish http://chenxiaoyu.org On Mon, Feb 25, 2013 at 4:04 PM, replay wrote: > I just realized that I messed up the formatting. Actually what I'm looking > for should be like this: > > { > > 1971:{"nickname":"Robby1","age":28,"age_p":42

Re: rds-json generate json with index key on first level of array

2013-02-25 Thread replay
I just realized that I messed up the formatting. Actually what I'm looking for should be like this: { 1971:{"nickname":"Robby1","age":28,"age_p":42,"city":"Dresden","plz":"","wio_plz":"2,4,5","gender":"m"}, 1972:{"nickname":"Robby2","age":29,"age_p":43,"city":"Dresden2","plz":"","wio_plz":"4,5","g

rds-json generate json with index key on first level of array

2013-02-24 Thread Mauro Stettler
Hello Nginx list I'm using OpenResty with libdrizzle to provide a faster API to query certain things from my db. My current config is like this: location ~* ^/resty/usersTable/userId/([0-9\,]+)$ { set_unescape_uri $uid $1; drizzle_query 'select id, nickname, age