http://www.sqlalchemy.org/trac/wiki/UsageRecipes/JSONColumn

:)


On 04/19/2013 04:50 AM, garcheck wrote:
I have some requirements like this.

One table model is:

class Demo(Base):
     jsondata = Column(Text)


This column "jsondata" is used for saving json data. And this Model would be used anywhere by many developers. I want to load it to a Python object when I query and dump it to string when I insert or update table automatically.

Now I has make it the first step by using event "create_instance" or "translate_row", but I have no idea to solve the insert or
update problem.

It may be typical way that make some agreements with other engineers about how to use this filed. But I think there is a
better way :)




--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to