Module Modeling.PyModel
Pythonic Description of an OO-RDBM Model
Rules:
- a model is an object of type Model
- a model may specify a list of entities, each of type Entity
- an entity may specify a list of properties, that are either of type Attribute
or \of type Relation
- all references to attributes, relations, entities, models, is by their "name"
i.e. not by their columnName or className, etc, as the case may be
- whenever deemed useful, defaults are used
- note that the default "type" for an attribute is int
(not string -- seems more logical to me)
- delete rule values are in lowercase
New Changes to note:
parentEntity -> parent
Entity only exposes a properties[] (that holds all attributes and relations)
default for Model.adaptorName is None
added doc attribute on all description classes
Previous changes:
defaults class dictionary variable, for all model description classes
deleteRule -> delete
multiplicityLowerBound and miltiplicity upperBound -> multiplicity
parentEntity -> isAlso
default for displayLabel is value of name (not of columnName)
Entity only has attributes[] (that may also be relations)
Function Summary |
|
debug(msg)
|
|
error(msg)
|
|
identity (x)
Returns x, unchanged |
|
relationsForSrcAndDst(src,
dst)
|
|
updateComponent (object,
kw,
defaults,
name,
ignore)
Parameters: |
|
xor(a,
b)
|
identity(x)
Returns x, unchanged -
|
updateComponent(object,
kw,
defaults,
name,
ignore=())
Parameters:
component --
kw -- NB: kw is not modified
defaults --
name --
-
|