Chris Withers wrote:
> Michael Bayer wrote:
>>> Has anyone (hi, list, talking to you too!) already done a custom type
>>> for this specific problem?
>>
>> people do custom types for all sorts of things.  In the case of the
>> Decimal here I'd likely subclass sqlalchemy.databases.sqlite.SLNumeric
>> which should ensure that your own bind_processor() and
>> result_processor()
>> methods can be called.
>
> Okay, but how do I make sure this is only used when sqlite this the
> engine?

You can use a TypeDecorator to switch between implementations.  I had a
plan to add a pre-fab type for this to core that allows easy switching of
implementations.


>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
>              - http://www.simplistix.co.uk
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to