Package cubicweb :: Package hooks :: Module syncschema
[hide private]
[frames] | no frames]

Module syncschema

source code

schema hooks:

checking for schema consistency is done in hooks.py

Classes [hide private]
  SyncSchemaHook
abstract class for schema synchronization hooks (in the syncschema category)
  DropTable
actually remove a database from the instance's schema
  DropRelationTable
  DropColumn
actually remove the attribut's column from entity table in the system database
  MemSchemaNotifyChanges
the update schema operation:
  MemSchemaOperation
base class for schema operations
  CWETypeAddOp
after adding a CWEType entity:...
  CWETypeRenameOp
this operation updates physical storage accordingly
  CWRTypeUpdateOp
actually update some properties of a relation definition
  CWAttributeAddOp
an attribute relation (CWAttribute) has been added: * add the necessary column * set default on this column if any and possible * register an operation to add the relation definition to the instance's schema on commit
  CWRelationAddOp
an actual relation has been added:
  RDefDelOp
an actual relation has been removed
  RDefUpdateOp
actually update some properties of a relation definition
  CWConstraintDelOp
actually remove a constraint of a relation definition
  CWConstraintAddOp
actually update constraint of a relation definition
  CWUniqueTogetherConstraintAddOp
  CWUniqueTogetherConstraintDelOp
  MemSchemaCWETypeDel
actually remove the entity type from the instance's schema
  MemSchemaCWRTypeAdd
actually add the relation type to the instance's schema
  MemSchemaCWRTypeDel
actually remove the relation type from the instance's schema
  MemSchemaPermissionAdd
synchronize schema when a *_permission relation has been added on a group
  MemSchemaPermissionDel
synchronize schema when a *_permission relation has been deleted from a group
  MemSchemaSpecializesAdd
  MemSchemaSpecializesDel
  DelCWETypeHook
before deleting a CWEType entity: * check that we don't remove a core entity type * cascade to delete related CWAttribute and CWRelation entities * instantiate an operation to delete the entity type on commit
  AfterDelCWETypeHook
  AfterAddCWETypeHook
after adding a CWEType entity:...
  BeforeUpdateCWETypeHook
check name change, handle final
  DelCWRTypeHook
before deleting a CWRType entity: * check that we don't remove a core relation type * cascade to delete related CWAttribute and CWRelation entities * instantiate an operation to delete the relation type on commit
  AfterAddCWRTypeHook
after a CWRType entity has been added: * register an operation to add the relation type to the instance's schema on commit
  BeforeUpdateCWRTypeHook
check name change, handle final
  AfterDelRelationTypeHook
before deleting a CWAttribute or CWRelation entity:...
  AfterAddCWAttributeHook
  AfterAddCWRelationHook
  AfterUpdateCWRDefHook
  AfterAddCWConstraintHook
  AfterAddConstrainedByHook
  BeforeDeleteConstrainedByHook
  AfterAddCWUniqueTogetherConstraintHook
  BeforeDeleteConstraintOfHook
  AfterAddPermissionHook
added entity/relation *_permission, need to update schema
  BeforeDelPermissionHook
delete entity/relation *_permission, need to update schema
  UpdateFTIndexOp
operation to update full text indexation of entity whose schema change
  AfterAddSpecializesHook
  AfterDelSpecializesHook
Functions [hide private]
 
get_constraints(session, entity) source code
 
group_mapping(cw) source code
 
add_inline_relation_column(session, etype, rtype)
add necessary column and index for an inlined relation
source code
 
insert_rdef_on_subclasses(session, eschema, rschema, rdefdef, props) source code
 
check_valid_changes(session, entity, ro_attrs=('name','final')) source code
 
_set_modifiable_constraints(rdef) source code
Variables [hide private]
  TYPE_CONVERTER = {'Boolean': bool, 'Int': int, 'Float': float,...
  CORE_TYPES = BASE_TYPES | SCHEMA_TYPES | META_RTYPES | set(('C...
Variables Details [hide private]

TYPE_CONVERTER

Value:
{'Boolean': bool, 'Int': int, 'Float': float, 'Password': str, 'String\
': unicode, 'Date': unicode, 'Datetime': unicode, 'Time': unicode,}

CORE_TYPES

Value:
BASE_TYPES | SCHEMA_TYPES | META_RTYPES | set(('CWUser', 'CWGroup', 'l\
ogin', 'upassword', 'name', 'in_group'))