I do not think so:
$ python web2py.py -S welcome -M -P
>>> db.define_table('x',Field('b','integer'))
>>> db.x.insert(b=3)
>>> db().select(db.x.b).first()
<Row {'b': 3L}>
>>> db().select(db.x.b.with_alias('c')).first()
<Row {'c': 3, '_extra': {'x.b AS c': 3L}}>
You had the the 3 as a string in the table to begin with. Perhaps you
changed the field type a some point?
On Sunday, 29 June 2014 23:44:28 UTC-5, Pham Quang Dung wrote:
>
> Can anyone explain to me what I did wrongly to have the unexpected string
> "test" field, instead of double?
>
> >>> x=db().select(tb.searchvalue.with_alias('test'))
> >>> x[0]
> <Row {'test': u'3', '_extra': {'tb.searchvalue AS test': 3.0}}>
> >>>
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.