module documentation

Schema definition and manipulation for DataGraphs domain models.

Class ValidationRule A validation rule for a property, e.g. ValidationRule(VALIDATION_RULE_TYPE.MAX_LENGTH, 200).
Exception ClassNotFoundError Raised when a class is not found in the schema.
Exception InvalidEnumeratorError Raised when an enum property would be left without permitted values.
Exception InvalidInversePropertyError Raised when an invalid inverse property is specified.
Exception PropertyExistsError Raised when attempting to create a property that already exists.
Exception PropertyNotFoundError Raised when a property is not found in a class.
Exception SchemaError Base exception for Schema-related errors.
Function _resulting_enum_values The permitted values an enum property will have once a create or update is applied: those the call gives, or else the property's current ones.
Constant _LENGTH_RULE_TYPES Undocumented
Constant _RULE_TYPES_BY_DATATYPE Undocumented
Constant _TEXT_RULE_TYPES Undocumented
def _resulting_enum_values(enums: list | None, validation_rules: list[ValidationRule] | None, existing_prop: dict | None) -> list | tuple:

The permitted values an enum property will have once a create or update is applied: those the call gives, or else the property's current ones.

_LENGTH_RULE_TYPES =
_RULE_TYPES_BY_DATATYPE: dict[str, frozenset[VALIDATION_RULE_TYPE]] =
_TEXT_RULE_TYPES =

Undocumented

Value
_LENGTH_RULE_TYPES | set([VALIDATION_RULE_TYPE.REGEX])