Exemplo n.º 1
0
    def __init__(self, *arg, **kw):
        TypeDecorator.__init__(self, *arg, **kw)

        def load_dialect_impl(self, dialect):
            if dialect.name == 'mysql':
                return dialect.type_descriptor(
                    sqlalchemy.dialects.mysql.DATETIME())
Exemplo n.º 2
0
    def __init__(self):
        """
        Initialize.
        """

        # base
        TypeDecorator.__init__(self)
Exemplo n.º 3
0
    def __init__(self, mutable = True):
        """
        Initialize.
        """

        TypeDecorator.__init__(self)

        self._mutable = mutable
Exemplo n.º 4
0
 def __init__(self,
              schema=None,
              post_load=None,
              pre_dump=None,
              *args,
              **kwargs):
     TypeDecorator.__init__(self, *args, **kwargs)
     self.schema = schema
     self.post_load = post_load
     self.pre_dump = pre_dump
Exemplo n.º 5
0
    def __init__(self, item_type, mutable = True):
        """
        Initialize.
        """

        # base
        TypeDecorator.__init__(self)

        # members
        self.item_type = item_type
        self._mutable = mutable
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 def __init__(self):
     TypeDecorator.__init__(self)
Exemplo n.º 9
0
 def __init__(self, path='', abspath='', *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
     self.path = path
     self.abspath = abspath
Exemplo n.º 10
0
 def __init__(self):
     TypeDecorator.__init__(self, asdecimal=False)
Exemplo n.º 11
0
 def __init__(self, *args, **kwargs):
   kwargs['length'] = 100
   TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 12
0
 def __init__(self, *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 13
0
 def __init__(self):
     TypeDecorator.__init__(self, length=32)
Exemplo n.º 14
0
 def __init__(self, *arg, **kwargs):
     TypeDecorator.__init__(self, *arg, **kwargs)
     self.delimiter = kwargs.get('delimiter', self.default_delimiter)
Exemplo n.º 15
0
 def __init__(self, enum):
     self.enum = enum
     TypeDecorator.__init__(self)
     SchemaType.__init__(self)
Exemplo n.º 16
0
 def __init__(self, scale=2):
     TypeDecorator.__init__(self)
     self.scale = scale
Exemplo n.º 17
0
	def __init__(*args, **kwargs):
		kwargs['length'] = 10 * 1024 * 1024;
		TypeDecorator.__init__(*args, **kwargs)
Exemplo n.º 18
0
 def __init__(self, *arg, **kw):
     """Init iLargeBinary type."""
     self.__class__.impl = self.impl
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 19
0
 def __init__(self, enum, values):
     self.enum = enum
     self.values = values
     TypeDecorator.__init__(self)
 def __init__(self, *args, **kwargs):
     self.enum_class = kwargs.pop('enum_class')
     TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 21
0
 def load_dialect_impl(self, dialect, **kwargs):
     if dialect.name.startswith('postgres'):
         return dialect.type_descriptor(TEXT)
     return TypeDecorator.load_dialect_impl(self, dialect, **kwargs)
Exemplo n.º 22
0
 def __init__(self, enum, *args, **kwargs):
     self._enum = enum
     TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 23
0
 def __init__(self, *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
     self.values = arg[0]
Exemplo n.º 24
0
    def __init__(self, *args, **kwargs):
        if 'charset' in kwargs:
            del kwargs['charset']

        TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 25
0
 def __init__(self, *arg, **kw):
     self.__class__.impl = self.impl;
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 26
0
 def __init__(self, *arg, **kw):
     self.__class__.impl = self.impl
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 27
0
 def __init__(self):
     TypeDecorator.__init__(self, 30)
Exemplo n.º 28
0
 def __init__(self, prefix, *args, **kw):
     TypeDecorator.__init__(self, *args, **kw)
     self.prefix = prefix
Exemplo n.º 29
0
 def __init__(self):
     TypeDecorator.__init__(self, as_decimal=False)
Exemplo n.º 30
0
    def __init__(self, pathspec, *args, **kwargs):
        self.resolver = AssetResolver()
        self.pathspec = pathspec

        TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 31
0
 def __init__(self, wibble=None, optionset='default', *args, **kw):
     TypeDecorator.__init__(self, *args, **kw)
     #super(ElfinderField, self).__init__()
     self.optionset = optionset
     self.wibble = wibble
Exemplo n.º 32
0
 def __init__(self, rounds=None, *args, **kwargs):
     TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 33
0
Arquivo: guid.py Projeto: jrha/aquilon
 def __init__(self):
     TypeDecorator.__init__(self, length=32)
Exemplo n.º 34
0
 def _set_parent_with_dispatch(self, parent):
     TypeDecorator._set_parent_with_dispatch(self, parent)
     SchemaType._set_parent_with_dispatch(self, parent)
Exemplo n.º 35
0
 def __init__(self, choices, **kwargs):
     self.choices = choices
     self.choices_dict = dict(choices)
     TypeDecorator.__init__(self, **kwargs)
Exemplo n.º 36
0
 def __init__(self, prefix, *args, **kw):
     TypeDecorator.__init__(self, *args, **kw)
     self.prefix = prefix
Exemplo n.º 37
0
 def __init__(self, *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 38
0
 def __init__(self, *arg, **kw):
     """Init iLargeBinary type."""
     self.__class__.impl = self.impl
     TypeDecorator.__init__(self, *arg, **kw)
Exemplo n.º 39
0
 def __init__(self, *args, **kwargs):
     self.enum_class = kwargs.pop('enum_class')
     TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 40
0
 def __init__(self, *args, **kwargs):
   assert self.Type is not None
   kwargs.setdefault('length', self.default_max_length)
   TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 41
0
 def __init__(self, item_type, *args, **kwargs):
     TypeDecorator.__init__(self, *args, **kwargs)
     self.item_type = item_type
Exemplo n.º 42
0
 def __init__(self, *args, **kwargs):
     assert self.Type is not None
     kwargs.setdefault('length', self.default_max_length)
     TypeDecorator.__init__(self, *args, **kwargs)
Exemplo n.º 43
0
 def __init__(self):
     self.impl.length = 30
     TypeDecorator.__init__(self, length=self.impl.length)
Exemplo n.º 44
0
 def load_dialect_impl(self, dialect, **kwargs):
     if dialect.name.startswith('postgres'):
         return dialect.type_descriptor(TEXT)
     return TypeDecorator.load_dialect_impl(self, dialect, **kwargs)
Exemplo n.º 45
0
 def __init__(self, item_type, *args, **kwargs):
     TypeDecorator.__init__(self, *args, **kwargs)
     self.item_type = item_type
Exemplo n.º 46
0
 def __init__(self, choices, **kwargs):
     self.choices = choices
     self.choices_dict = dict(choices)
     TypeDecorator.__init__(self, **kwargs)
 def __init__(self, enum, *args, **kw):
     self.enum = enum
     TypeDecorator.__init__(self, *args, **kw)
Exemplo n.º 48
0
 def __init__(self):
     self.impl.length = 30
     TypeDecorator.__init__(self, length=self.impl.length)
Exemplo n.º 49
0
 def __init__(self, path='', abspath='', *arg, **kw):
     TypeDecorator.__init__(self, *arg, **kw)
     self.path = path
     self.abspath = abspath
Exemplo n.º 50
0
 def __init__(self, enum, values):
     self.enum = enum
     self.values = values
     TypeDecorator.__init__(self)