On Thu, Aug 15, 2013 at 12:21:43PM -0400, Michael Bayer wrote:
On Aug 14, 2013, at 9:24 PM, Jeff Dairiki dair...@dairiki.org wrote:
I'm working with an existing MySQL schema that has lots of columns of
type ENUM('N', 'Y'). I'd like to deal with them as real booleans on
the python side.
On Aug 16, 2013, at 9:40 AM, Jeff Dairiki dair...@dairiki.org wrote:
Thank you for the quick response (as always), Mike.
But I'm still fuddled.
Okay, so I can customize how __invert__(), __and__() and __or__() (all
the operations that evaluate their arguments in a boolean context) get
On Aug 14, 2013, at 9:24 PM, Jeff Dairiki dair...@dairiki.org wrote:
I'm working with an existing MySQL schema that has lots of columns of
type ENUM('N', 'Y'). I'd like to deal with them as real booleans on
the python side.
I have a simple TypeDecorator which almost works (I think):
I'm working with an existing MySQL schema that has lots of columns of
type ENUM('N', 'Y'). I'd like to deal with them as real booleans on
the python side.
I have a simple TypeDecorator which almost works (I think):
class YNBoolean(sqlalchemy.types.TypeDecorator):
impl =