On Mon, 2013-11-18 at 13:46 -0500, Michael Bayer wrote:
> s.query(A).update({A.data: A.data + {"foo": "bat", "hoho": "lala"}},
> synchronize_session="fetch")
Yes, updating my example to follow this form works.
session.query(User).\
filter(User.prefs.has_key('inboundBusStop')).\
update({User.prefs: User.prefs + {'transitAvaiable': 'true', }, },
synchronize_session="fetch")
- results in -
UPDATE user_data SET prefs=(user_data.prefs || %(prefs_1)s) WHERE
user_data.prefs ? %(prefs_2)s
{'prefs_1': {'transitAvaiable': 'true'}, 'prefs_2': 'inboundBusStop'}
Which is perfect.
Urgh, I cannot wait till PG9.4 & nested HSTORE support. Very cool
stuff.
--
Adam Tauno Williams <mailto:[email protected]> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.