Package orm2 :: Package adapters :: Package pgsql :: Module datatypes :: Class serial
[hide private]
[frames] | no frames]

Class serial

source code

    object --+            
             |            
      property --+        
                 |        
datatypes.datatype --+    
                     |    
     datatypes.integer --+
                         |
                        serial

Datatype class for PostgreSQL serial columns

Nested Classes [hide private]

Inherited from datatypes.integer: python_class, sql_literal_class


Instance Methods [hide private]
  __init__(self, column=None, sequence_name=None)
  __select_after_insert__(self, dbobj)
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.
  __set__(self, dbobj, value)
Set the attribute managed by this datatype class on instance to value.

Inherited from datatypes.datatype: __convert__, __delete__, __get__, __init_dbclass__, __select_this_column__, __set_from_result__, __setattr__, add_widget, check_dbobj, data_attribute_name, isset, sql_literal, widget_specs

Inherited from property: __getattribute__, __new__

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


Class Variables [hide private]

Inherited from property: fdel, fget, fset


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, column=None, sequence_name=None)
(Constructor)

source code 
Parameters:
  • sequence_name - The SQL identifyer of the sequence used for this serial. It defaults to the one created by the backend.
Overrides: datatypes.datatype.__init__

__select_after_insert__(self, dbobj)

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: datatypes.datatype.__select_after_insert__
(inherited documentation)

__set__(self, dbobj, value)

source code 
Set the attribute managed by this datatype class on instance to value. This will be called by Python on attribute assignment. The __set_from_result__ method does the same thing for data retrieved from the RDBMS. See below.
Overrides: datatypes.datatype.__set__
(inherited documentation)