forgot to add -- this creates the following SQL:

UPDATE user_data SET prefs=(user_data.prefs || hstore(ARRAY[%(param_1)s, 
%(param_2)s])) WHERE user_data.prefs ? %(prefs_1)s
{'prefs_1': 'inboundBusStop', 'param_1': 'transitAvaiable', 'param_2': 
'true'}

Note that it's using one of the htsore array formats , and a bitwise 
operator.  This allows you to just to the minimal SQL needed (instead of 
having to slurp the whole hstore to edit a field, then toss the entire 
thing back again )

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to