>>> db.define_table("mytable", Field("mytext", "text"))
<Table mytable (id,mytext)>
>>> db.mytable.insert(mytext=(1,2,3,4))
1L
>>> db.mytable[1].mytext
'|1|2|3|4|'
>>> print db.mytable[1].mytext
|1|2|3|4|

I am trying to implement native support for json data type in dal (for 
databases like mongodb) and found this behavior

Is this correct? I'd expect any non string object passed to .insert/.update 
for text fields to be converted to database string type (the one specified 
for the adapter), not a bar encoded string. Also, the default widget is 
completed with the bar encoded value. I think that some fields like text 
(anything but list:<type> in fact) should not bar encode input.

My version is
web2py Version 2.4.1-alpha.2+timestamp.2013.01.06.09.27.15

-- 



Reply via email to