Why is DAL returning a tuple here?

>>> from dal import DAL
>>> db = DAL('postgres://web2pyuser:password@localhost:5432/webtest', 
fake_migrate_all=True)
>>> q = '''select coalesce(sum(amount), 0) from product_journal'''
>>> db.executesql(q)
[(Decimal('250.000'),)] # Why is the returned value a tuple? This does not 
seem to make sense.
>>> q = '''select coalesce(sum(amount), 0) from product_journal where 
product_id = 255'''
>>> db.executesql(q)
[(Decimal('0'),)]


Is this the way it's supposed to work and will it stay this way?

-- 
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 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to