Re: [sqlalchemy] converting date @ hybrid property

2015-08-24 Thread Mehdi
After reading more documents i ended up using comparator for my hybrid property instead of expression. like: class JalaliDateComparator(Comparator): def operate(self, op, other): input_date = self.__clause_element__() g_date = other.togregorian() return

Re: [sqlalchemy] converting date @ hybrid property

2015-08-23 Thread Mike Bayer
On 8/22/15 4:30 PM, Mehdi wrote: Hi I'm using latest sqlalchemy with an Oracle db backend. I have a Date column which presents a /Gregorian date/ in db. but i want to query my table by a /Jalali date/. So the hybrid_property to convert gregorian date into jalali date should be like this, i

[sqlalchemy] converting date @ hybrid property

2015-08-22 Thread Mehdi
Hi I'm using latest sqlalchemy with an Oracle db backend. I have a Date column which presents a *Gregorian date* in db. but i want to query my table by a *Jalali date*. So the hybrid_property to convert gregorian date into jalali date should be like this, i think: @hybrid_property def