Return to Snippet

Revision: 7191
at July 13, 2008 11:36 by rob_cowie


Initial Code
class ISIN(satypes.TypeDecorator):
    """Validate ISIN on input and convert ISIN to string on ingress, string to ISIN on egress"""
    impl = satypes.String
    def __init__(self, *args, **kargs):
        satypes.TypeDecorator.__init__(self, *args, **kargs)
    
    def convert_bind_param(self, value, engine):
        return self.impl.convert_bind_param(value, engine)
    
    def convert_result_value(self, value, engine):
        return self.impl.convert_result_value(value, engine)

Initial URL

                                

Initial Description

                                

Initial Title
Skeleton sqlalchemy typedecorator

Initial Tags
textmate, python

Initial Language
Other