Package orm2 :: Module datatypes :: Class delayed
[hide private]
[frames] | no frames]

Class delayed

source code

object --+            
         |            
  property --+        
             |        
      datatype --+    
                 |    
           wrapper --+
                     |
                    delayed

This is a pseudy-datatype that takes an actual datatype as argument. Values from that datatypes's column will not be SELECTed from the database regularly, but only on attribute access. This way you can treat a dbclass that contains large amount of data just like all the others and only load the data at the point in time when it's needed.

Instance Methods [hide private]
  __init__(self, inside_datatype, cache=False)
  __get__(self, dbobj, owner="I don't know what this is for")
See the Python Language Reference, chapter 3.3.2.2 for details on how this works.
  __select_this_column__(self)
Indicate whether this column shall be included in SELECT statements.
  __select_after_insert__(self, *args)
Indicate whether this column needs to be SELECTed after the dbobj has been inserted to pick up information supplied by backend as by SQL default values and auto increment columns.
  __copy__(self)

Inherited from wrapper: __eq__, __getattribute__, widget_specs

Inherited from datatype: __convert__, __delete__, __init_dbclass__, __set__, __set_from_result__, __setattr__, add_widget, check_dbobj, data_attribute_name, isset, sql_literal

Inherited from property: __new__

Inherited from object: __delattr__, __hash__, __reduce__, __reduce_ex__, __repr__, __str__


Class Variables [hide private]

Inherited from datatype: python_class, sql_literal_class

Inherited from property: fdel, fget, fset


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, inside_datatype, cache=False)
(Constructor)

source code 
Parameters:
  • inside_datatype - The datatype <b>instance</b> this wrapper is responsible for
  • cache - Parameter that determines whether the data is kept in memory once it is loaded from the database
Overrides: wrapper.__init__

__get__(self, dbobj, owner="I don't know what this is for")

source code 
See the Python Language Reference, chapter 3.3.2.2 for details on how this works. Be sure to be in a relaxed, ready-for-hard-figuring mood.
Overrides: datatype.__get__
(inherited documentation)

__select_this_column__(self)

source code 
Indicate whether this column shall be included in SELECT statements. True by default, it will return False for most relationships.
Overrides: datatype.__select_this_column__
(inherited documentation)

__select_after_insert__(self, *args)

source code 
Indicate whether this column needs to be SELECTed after the dbobj has been inserted to pick up information supplied by backend as by SQL default values and auto increment columns.
Overrides: datatype.__select_after_insert__
(inherited documentation)

__copy__(self)

source code 
None
Overrides: wrapper.__copy__