[sqlalchemy] Re: postgresql, jsob and like operator

2015-12-01 Thread Michal Nowikowski
Great, it works. Thank you very much. Regards, Michal On Tuesday, December 1, 2015 at 6:49:05 PM UTC+1, Jonathan Vanasco wrote: > > I don't think you can get that exact query staying within the ORM's > cross-platform functionality -- I don't think there is anything that can > generate the `::`

Re: [sqlalchemy] Re: postgresql, jsob and like operator

2015-12-01 Thread Mike Bayer
On 12/01/2015 12:49 PM, Jonathan Vanasco wrote: > I don't think you can get that exact query staying within the ORM's > cross-platform functionality -- I don't think there is anything that can > generate the `::` version of casting... but I think something like this > should produce the same

Re: [sqlalchemy] Re: postgresql, jsob and like operator

2015-12-01 Thread Jonathan Vanasco
On Tuesday, December 1, 2015 at 7:12:15 PM UTC-5, Michael Bayer wrote: see also the JSON operators which have some built-in text casting stuff: > > > http://docs.sqlalchemy.org/en/rel_1_0/dialects/postgresql.html?highlight=json#sqlalchemy.dialects.postgresql.JSON > > > this is also getting

[sqlalchemy] Re: postgresql, jsob and like operator

2015-12-01 Thread Jonathan Vanasco
I don't think you can get that exact query staying within the ORM's cross-platform functionality -- I don't think there is anything that can generate the `::` version of casting... but I think something like this should produce the same output: r = session.query( Device.id, Device.name,