Quick hack, figured I would share since there seemed to be other
people asking about it.
I couldn't get it to work with "autoload=True" for table reflection.
---
from sqlalchemy import types
from decimal import Decimal
class Money(types.UserDefinedType):
def get_col_spec(self):
return 'money'
def result_processor(self, dialect, coltype):
def process(value):
# Strip off the currency symbol
return Decimal(value[1:])
return process
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.