Re: [sqlalchemy] How to update jsonb blob subset values using sqlalchemy orm ?

2019-07-07 Thread NanthaKumar Loganathan
thanks it worked for me On Thursday, July 4, 2019 at 7:42:45 PM UTC+5:30, Mike Bayer wrote: > > it looks like Postgresql 9.5+ has a new function jsonb_set that does this, > this can be used with func. If you aren't on pg9.5 you might have to > update the whole value. > > full POC below > >

Re: [sqlalchemy] How to update jsonb blob subset values using sqlalchemy orm ?

2019-07-05 Thread Cameron Simpson
On 04Jul2019 10:12, Mike Bayer wrote: it looks like Postgresql 9.5+ has a new function jsonb_set that does this, this can be used with func. If you aren't on pg9.5 you might have to update the whole value. full POC below [... nice code which works with modern PostgreSQL ...] And if you

Re: [sqlalchemy] How to update jsonb blob subset values using sqlalchemy orm ?

2019-07-04 Thread Mike Bayer
it looks like Postgresql 9.5+ has a new function jsonb_set that does this, this can be used with func. If you aren't on pg9.5 you might have to update the whole value. full POC below from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import func from sqlalchemy

[sqlalchemy] How to update jsonb blob subset values using sqlalchemy orm ?

2019-07-04 Thread NanthaKumar Loganathan
Hi , I have below jsonb blob which i wanted to update subset value. { "preference": { "android": { "software_update": "true", "system_maintenance": "true" }, "ios": { "software_update": "true", "system_maintenance": "true" } } } how to i update only