Exemplo n.º 1
0
 def process_result_value(self, value, dialect):
     if value is not None:
         try:
             value = ZlibMarshal.loads(value)
         except:
             value = None
     return value if value is not None else \
         (self.default_value() if callable(self.default_value) else
          self.default_value)
Exemplo n.º 2
0
 def process_result_value(self, value, dialect):
     """Load comressed data from column."""
     if value is not None:
         try:
             value = ZlibMarshal.loads(value)
         except:
             value = None
     return value if value is not None else \
         (self.default_value() if callable(self.default_value) else
          self.default_value)
Exemplo n.º 3
0
 def process_result_value(self, value, dialect):
     """Load comressed data from column."""
     if value is not None:
         try:
             value = ZlibMarshal.loads(value)
         except:
             value = None
     return value if value is not None else \
         (self.default_value() if callable(self.default_value) else
          self.default_value)
Exemplo n.º 4
0
 def process_bind_param(self, value, dialect):
     """Compress data in column."""
     if value is not None:
         value = ZlibMarshal.dumps(self.force_type(value))
         return value
     return value
Exemplo n.º 5
0
 def process_bind_param(self, value, dialect):
     """Compress data in column."""
     if value is not None:
         value = ZlibMarshal.dumps(self.force_type(value))
         return value
     return value
Exemplo n.º 6
0
 def process_bind_param(self, value, dialect):
     if value is not None:
         value = ZlibMarshal.dumps(self.force_type(value))
         return value
     return value