[web2py] Re: Accessing some sum

2019-08-13 Thread Val K
https://github.com/web2py/pydal/issues/388 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Goo

[web2py] Re: Accessing some sum

2019-08-13 Thread Val K
I saw in some post that implicit query like db() with no args is not supported now -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this mess

[web2py] Re: Accessing some sum

2019-08-13 Thread Dave S
On Saturday, August 3, 2019 at 2:47:57 AM UTC-7, Val K wrote: > > Try db(db.test1).select(sum) On hold for the moment, but on another machine I have code that uses the book example, so I must have done something wrong on this machine. /dps -- Resources: - http://web2py.com - http://web2py.c

[web2py] Re: Accessing some sum

2019-08-03 Thread Val K
Try db(db.test1).select(sum) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "w

[web2py] Re: Accessing some sum

2019-08-03 Thread Dave S
On Saturday, August 3, 2019 at 12:53:02 AM UTC-7, Val K wrote: > > I just want to say that you can't retrieve sum from row using the > string-key 'sum', you should use the object as in the book example. And it > would be better if dal supports syntax like db.table.field.sum().as('mysum') When

[web2py] Re: Accessing some sum

2019-08-03 Thread Val K
and of course, if you convert result to json or list/dict you have to use '_extra' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this mess

[web2py] Re: Accessing some sum

2019-08-03 Thread Val K
I just want to say that you can't retrieve sum from row using the string-key 'sum', you should use the object as in the book example. And it would be better if dal supports syntax like db.table.field.sum().as('mysum') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Accessing some sum

2019-08-02 Thread Dave S
On Friday, August 2, 2019 at 10:17:27 AM UTC-7, Val K wrote: > > It is not a bug, as you probably know dal does not support fields aliases > and '_extra' is workaround. When do you get an error? Should it be considered a bug in the book? I'm not quite sure how aliases fit in ... does Postgres