db.schemas.schema
Module defining base functions and classes for implementing a schema
Module Contents
Classes
Functions
Data
SaveOptionsType
API
emtellipro.db.schemas.schema.SchemaManifest
Representation of a database schema, containing the SQLAlchemy metadata object, and the module implementing it.
Authors of schemas must provide an object that is an instance of this class (or a subclass). This class itself can be instantiated, but if some of the properties need to be overridden, then a subclass will be necessary.
SchemaManifest.name
Value: None
SchemaManifest.models
Value: None
SchemaManifest.migrations
Value: None
SchemaManifest.save
Value: None
SchemaManifest.save_options
Value: None
SchemaManifest.__post_init__
SchemaManifest.metadata
The base SQLAlchemy metadata
SchemaManifest.alembic_config
Path to alembic config file.
SchemaManifest.tables
The list of tables in the SQLAlchemy metadata object.
emtellipro.db.schemas.schema.SaveDocument
This stores references to the input document and annotated document pair
that should be passed to the save() method in each schema.
SaveDocument.annotated
Value: None
SaveDocument.input
Value: None
SaveDocument.text
emtellipro.db.schemas.schema.SaveOptions
Base class for the save options for each save function.
emtellipro.db.schemas.schema.SaveOptionsType
Value: TypeVar(...)
emtellipro.db.schemas.schema.save_options_replace
Replace the attributes of options with matching values from
replacements.
Parameters:
Returns:
A new instance of the same type as options, with changed attributes.
