當前位置: 首頁>>代碼示例>>Python>>正文


Python types.TypeDecorator類代碼示例

本文整理匯總了Python中sqlalchemy.types.TypeDecorator的典型用法代碼示例。如果您正苦於以下問題:Python TypeDecorator類的具體用法?Python TypeDecorator怎麽用?Python TypeDecorator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TypeDecorator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

    def __init__(self):
        """
        Initialize.
        """

        # base
        TypeDecorator.__init__(self)
開發者ID:borg-project,項目名稱:cargo,代碼行數:7,代碼來源:alchemy.py

示例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)
開發者ID:magfest,項目名稱:ubersystem,代碼行數:14,代碼來源:types.py

示例3: __init__

 def __init__(self, *arg, **kw):
     """Init iLargeBinary type."""
     self.__class__.impl = self.impl
     TypeDecorator.__init__(self, *arg, **kw)
開發者ID:dset0x,項目名稱:invenio,代碼行數:4,代碼來源:mysql.py

示例4: __init__

 def __init__(self, *args, **kwargs):
     self.enum_class = kwargs.pop('enum_class')
     TypeDecorator.__init__(self, *args, **kwargs)
開發者ID:oinume,項目名稱:dmm-eikaiwa-tsc,代碼行數:3,代碼來源:b4001f70c_create_schedule_table.py

示例5: __init__

 def __init__(self):
     TypeDecorator.__init__(self, asdecimal=False)
開發者ID:nrlakin,項目名稱:impulse,代碼行數:2,代碼來源:aware_models.py

示例6: __init__

 def __init__(self, *args, **kwargs):
   kwargs['length'] = 100
   TypeDecorator.__init__(self, *args, **kwargs)
開發者ID:mmariani,項目名稱:abilian-core,代碼行數:3,代碼來源:models.py

示例7: __init__

 def __init__(self):
     TypeDecorator.__init__(self, 30)
開發者ID:Plurk,項目名稱:Solace,代碼行數:2,代碼來源:database.py

示例8: __init__

 def __init__(self, item_type, *args, **kwargs):
     TypeDecorator.__init__(self, *args, **kwargs)
     self.item_type = item_type
開發者ID:CyrilleFranchet,項目名稱:ivre,代碼行數:3,代碼來源:tables.py

示例9: __init__

 def __init__(self, enum, *args, **kwargs):
     self._enum = enum
     TypeDecorator.__init__(self, *args, **kwargs)
開發者ID:anxolerd,項目名稱:Meowth,代碼行數:3,代碼來源:types.py

示例10: __init__

 def __init__(self):
     TypeDecorator.__init__(self, length=32)
開發者ID:jrha,項目名稱:aquilon,代碼行數:2,代碼來源:guid.py

示例11: __init__

 def __init__(self, *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
開發者ID:uralbash,項目名稱:pyramid_elfinder,代碼行數:2,代碼來源:models.py

示例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
開發者ID:RobertSudwarts,項目名稱:tg2-elfinder,代碼行數:5,代碼來源:models.py

示例13: __init__

    def __init__(self, *args, **kwargs):
        if 'charset' in kwargs:
            del kwargs['charset']

        TypeDecorator.__init__(self, *args, **kwargs)
開發者ID:greylock,項目名稱:batteries,代碼行數:5,代碼來源:types.py

示例14: __init__

 def __init__(self, enum):
     self.enum = enum
     TypeDecorator.__init__(self)
     SchemaType.__init__(self)
開發者ID:QLGu,項目名稱:flask-spoilerplate,代碼行數:4,代碼來源:sqlalchemy.py

示例15: __init__

	def __init__(*args, **kwargs):
		kwargs['length'] = 10 * 1024 * 1024;
		TypeDecorator.__init__(*args, **kwargs)
開發者ID:gunnarbeutner,項目名稱:zfsci,代碼行數:3,代碼來源:joblib.py


注:本文中的sqlalchemy.types.TypeDecorator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。