[sqlalchemy] how can I search rows containing jsonb data on the basis of it's key>

2016-03-19 Thread Krishnakant
Hello, I wish to search rows in my table on the basis of text of json keys. My table has vouchercode, voucherdate, dramt, cramt. Here dramt and cramt are both jsonb fields (postgresql 9.4). dramt containes account and amount, same with cramt. sample date. vouchercode:1 ... dramt{"1":25,"2":25}

Re: [sqlalchemy] how can I search rows containing jsonb data on the basis of it's key>

2016-03-19 Thread Simon King
On Fri, Mar 18, 2016 at 5:12 AM, Krishnakant wrote: > > > On Thursday 17 March 2016 03:46 PM, Simon King wrote: > > On Thu, Mar 17, 2016 at 7:19 AM, Krishnakant > wrote: > >> Hello, >> I wish to search rows in my table on the basis of text of json

Re: [sqlalchemy] how can I search rows containing jsonb data on the basis of it's key>

2016-03-19 Thread Simon King
On Thu, Mar 17, 2016 at 7:19 AM, Krishnakant wrote: > Hello, > I wish to search rows in my table on the basis of text of json keys. > My table has vouchercode, voucherdate, dramt, cramt. > Here dramt and cramt are both jsonb fields (postgresql 9.4). > dramt containes

Re: [sqlalchemy] how can I search rows containing jsonb data on the basis of it's key>

2016-03-18 Thread Jonathan Vanasco
To add to Simon's resposne: SqlAlchemy has some postgres specific extensions to the dialect. http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#sqlalchemy.dialects.postgresql.JSONB -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To

Re: [sqlalchemy] how can I search rows containing jsonb data on the basis of it's key>

2016-03-18 Thread Jonathan Vanasco
On Friday, March 18, 2016 at 8:48:48 AM UTC-4, Simon King wrote: I think you should be able to use something like: > I find it easier to run raw sql to grab data like that. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from