Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-12 Thread Mike Bayer
On 02/12/2016 02:29 AM, immerrr again wrote: On Thu, Feb 11, 2016 at 8:48 PM, Mike Bayer wrote: Good point, but this may not be an option. Currently we return NULLTYPE for such ambigious comparisons but it's not known what side effects would occur if we across the board assumed the other s

Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-11 Thread immerrr again
On Thu, Feb 11, 2016 at 8:48 PM, Mike Bayer wrote: > > Good point, but this may not be an option. Currently we return NULLTYPE > for such ambigious comparisons but it's not known what side effects would > occur if we across the board assumed the other side should operate (plus the > other side n

Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-11 Thread Mike Bayer
On 02/11/2016 01:16 PM, immerrr again wrote: > well Python only allows one side's operator override to be called, so > when DateTime is on the left, its own operate() method is called and not > yours. Excuse me for barging in, but the operator function can return a "NotImplemented" singleto

Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-11 Thread immerrr again
> well Python only allows one side's operator override to be called, so > when DateTime is on the left, its own operate() method is called and not > yours. Excuse me for barging in, but the operator function can return a "NotImplemented" singleton and Python will retry the operation reflected o

Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-09 Thread Mike Bayer
On 02/09/2016 12:30 AM, Rudolf Cardinal wrote: Dear all, I've been trying to implement a datetime-style field in SQL Alchemy that, in the database backend, uses a specific ISO-8601 format (e.g. "2013-04-30T00:26:03.000+05:00"), and is a datetime at the Python end. The primary database engine

[sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-08 Thread Rudolf Cardinal
Dear all, I've been trying to implement a datetime-style field in SQL Alchemy that, in the database backend, uses a specific ISO-8601 format (e.g. " 2013-04-30T00:26:03.000+05:00"), and is a datetime at the Python end. The primary database engine is MySQL. I don't want to implement this as a