本文整理匯總了Python中sqlalchemy.types.TypeDecorator類的典型用法代碼示例。如果您正苦於以下問題:Python TypeDecorator類的具體用法?Python TypeDecorator怎麽用?Python TypeDecorator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TypeDecorator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self):
"""
Initialize.
"""
# base
TypeDecorator.__init__(self)
示例2: __init__
def __init__(self, choices, *, allow_unspecified=False, **kwargs):
"""
Args:
choices: an array of tuples, where the first element of each tuple
is the integer being stored and the second element is a string
description of the value.
allow_unspecified: by default, an exception is raised if you try
to save a row with a value which is not in the choices list
passed to this class; set this to True if you want to allow
non-default values.
"""
self.choices = dict(choices)
self.allow_unspecified = allow_unspecified
TypeDecorator.__init__(self, **kwargs)
示例3: __init__
def __init__(self, *arg, **kw):
"""Init iLargeBinary type."""
self.__class__.impl = self.impl
TypeDecorator.__init__(self, *arg, **kw)
示例4: __init__
def __init__(self, *args, **kwargs):
self.enum_class = kwargs.pop('enum_class')
TypeDecorator.__init__(self, *args, **kwargs)
示例5: __init__
def __init__(self):
TypeDecorator.__init__(self, asdecimal=False)
示例6: __init__
def __init__(self, *args, **kwargs):
kwargs['length'] = 100
TypeDecorator.__init__(self, *args, **kwargs)
示例7: __init__
def __init__(self):
TypeDecorator.__init__(self, 30)
示例8: __init__
def __init__(self, item_type, *args, **kwargs):
TypeDecorator.__init__(self, *args, **kwargs)
self.item_type = item_type
示例9: __init__
def __init__(self, enum, *args, **kwargs):
self._enum = enum
TypeDecorator.__init__(self, *args, **kwargs)
示例10: __init__
def __init__(self):
TypeDecorator.__init__(self, length=32)
示例11: __init__
def __init__(self, *arg, **kw):
TypeDecorator.__init__(self, *arg, **kw)
示例12: __init__
def __init__(self, wibble=None, optionset='default', *args, **kw):
TypeDecorator.__init__(self, *args, **kw)
#super(ElfinderField, self).__init__()
self.optionset = optionset
self.wibble = wibble
示例13: __init__
def __init__(self, *args, **kwargs):
if 'charset' in kwargs:
del kwargs['charset']
TypeDecorator.__init__(self, *args, **kwargs)
示例14: __init__
def __init__(self, enum):
self.enum = enum
TypeDecorator.__init__(self)
SchemaType.__init__(self)
示例15: __init__
def __init__(*args, **kwargs):
kwargs['length'] = 10 * 1024 * 1024;
TypeDecorator.__init__(*args, **kwargs)