Augmenter Databases

The augmentdb module defines AugmentDatabase.

Augmenter Database

An AugmentDatabase is derived from Database. It contains two “dictionary” objects.

One is the Dicts container from its parent class. The db Dicts object, defines the database schemas, including their tables and other objects, by querying the system catalogs.

The second container is an AugDicts object. The adb AugDicts object specifies the schemas to be augmented and the augmenter configuration objects. The latter objects may be supplied either by other Augmenter modules or from the ‘augmenter’ configuration tree on the aug_map supplied to the apply method.

class pyrseas.augmentdb.AugmentDatabase(config)

A database that is to be augmented


Apply augmentations to an existing database

Parameters:aug_map – a YAML map defining the desired augmentations

Merges an existing database definition, as fetched from the catalogs, with an input YAML defining augmentations on various objects and an optional configuration map or the predefined configuration.


Populate the augment objects from the input augment map

Parameters:aug_map – a YAML map defining the desired augmentations

The adb holder is populated by various DbAugmentDict-derived classes by traversing the YAML augmentation map. The objects in the dictionary are then linked to related objects, e.g., tables are linked to the schemas they belong.