本文整理汇总了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)