hydra.error.neo4j module

Error types for Neo4j property graph validation.

class hydra.error.neo4j.InvalidGraphError

Bases: object

InvalidGraphErrorNode | InvalidGraphErrorRelationship

NODE = Name(value='node')
RELATIONSHIP = Name(value='relationship')
TYPE_ = Name(value='hydra.error.neo4j.InvalidGraphError')
class hydra.error.neo4j.InvalidGraphErrorNode(value: T)

Bases: Node[InvalidGraphNodeError]

A node in the graph is invalid

class hydra.error.neo4j.InvalidGraphErrorRelationship(value: T)

Bases: Node[InvalidGraphRelationshipError]

A relationship in the graph is invalid

class hydra.error.neo4j.InvalidGraphNodeError(id: Annotated[ElementId, 'The element id of the invalid node'], error: Annotated[InvalidNodeError, 'The specific error'])

Bases: object

An invalid node within a graph, identified by its element id.

class Builder(_id: 'hydra.neo4j.model.ElementId' = None, _error: 'InvalidNodeError' = None)

Bases: object

build()
error(error)
id(id)
ERROR = Name(value='error')
ID = Name(value='id')
TYPE_ = Name(value='hydra.error.neo4j.InvalidGraphNodeError')
static builder()
error: Annotated[InvalidNodeError, 'The specific error']
id: Annotated[ElementId, 'The element id of the invalid node']
with_error(error)
with_id(id)
class hydra.error.neo4j.InvalidGraphRelationshipError(id: Annotated[ElementId, 'The element id of the invalid relationship'], error: Annotated[InvalidRelationshipError, 'The specific error'])

Bases: object

An invalid relationship within a graph, identified by its element id.

class Builder(_id: 'hydra.neo4j.model.ElementId' = None, _error: 'InvalidRelationshipError' = None)

Bases: object

build()
error(error)
id(id)
ERROR = Name(value='error')
ID = Name(value='id')
TYPE_ = Name(value='hydra.error.neo4j.InvalidGraphRelationshipError')
static builder()
error: Annotated[InvalidRelationshipError, 'The specific error']
id: Annotated[ElementId, 'The element id of the invalid relationship']
with_error(error)
with_id(id)
class hydra.error.neo4j.InvalidNodeError

Bases: object

InvalidNodeErrorKeyViolation | InvalidNodeErrorMissingImpliedLabel | InvalidNodeErrorMissingProperty | InvalidNodeErrorNoSuchLabel | InvalidNodeErrorUniquenessViolation | InvalidNodeErrorWrongPropertyType

KEY_VIOLATION = Name(value='keyViolation')
MISSING_IMPLIED_LABEL = Name(value='missingImpliedLabel')
MISSING_PROPERTY = Name(value='missingProperty')
NO_SUCH_LABEL = Name(value='noSuchLabel')
TYPE_ = Name(value='hydra.error.neo4j.InvalidNodeError')
UNIQUENESS_VIOLATION = Name(value='uniquenessViolation')
WRONG_PROPERTY_TYPE = Name(value='wrongPropertyType')
class hydra.error.neo4j.InvalidNodeErrorKeyViolation(value: T)

Bases: Node[KeyError]

A key constraint is violated

class hydra.error.neo4j.InvalidNodeErrorMissingImpliedLabel(value: T)

Bases: Node[MissingLabelError]

The node is missing a label implied by its node element type

class hydra.error.neo4j.InvalidNodeErrorMissingProperty(value: T)

Bases: Node[PropertyExistenceError]

The node is missing a property required by a property existence constraint

class hydra.error.neo4j.InvalidNodeErrorNoSuchLabel(value: T)

Bases: Node[NoSuchLabelError]

The node’s labels do not match any node element type in the graph type

class hydra.error.neo4j.InvalidNodeErrorUniquenessViolation(value: T)

Bases: Node[PropertyUniquenessError]

A property uniqueness constraint is violated

class hydra.error.neo4j.InvalidNodeErrorWrongPropertyType(value: T)

Bases: Node[PropertyTypeError]

A property of the node violates a property type constraint

class hydra.error.neo4j.InvalidRelationshipError

Bases: object

InvalidRelationshipErrorEndNodeNotFound | InvalidRelationshipErrorKeyViolation | InvalidRelationshipErrorMissingProperty | InvalidRelationshipErrorNoMatchingPattern | InvalidRelationshipErrorNoSuchType | InvalidRelationshipErrorStartNodeNotFound | InvalidRelationshipErrorUniquenessViolation | InvalidRelationshipErrorWrongPropertyType

END_NODE_NOT_FOUND = Name(value='endNodeNotFound')
KEY_VIOLATION = Name(value='keyViolation')
MISSING_PROPERTY = Name(value='missingProperty')
NO_MATCHING_PATTERN = Name(value='noMatchingPattern')
NO_SUCH_TYPE = Name(value='noSuchType')
START_NODE_NOT_FOUND = Name(value='startNodeNotFound')
TYPE_ = Name(value='hydra.error.neo4j.InvalidRelationshipError')
UNIQUENESS_VIOLATION = Name(value='uniquenessViolation')
WRONG_PROPERTY_TYPE = Name(value='wrongPropertyType')
class hydra.error.neo4j.InvalidRelationshipErrorEndNodeNotFound

Bases: object

The end node does not exist in the graph

class hydra.error.neo4j.InvalidRelationshipErrorKeyViolation(value: T)

Bases: Node[KeyError]

A key constraint is violated

class hydra.error.neo4j.InvalidRelationshipErrorMissingProperty(value: T)

Bases: Node[PropertyExistenceError]

The relationship is missing a property required by a property existence constraint

class hydra.error.neo4j.InvalidRelationshipErrorNoMatchingPattern(value: T)

Bases: Node[NoMatchingPatternError]

The relationship’s type is declared, but its endpoint labels match none of the declared source/target patterns for that type

class hydra.error.neo4j.InvalidRelationshipErrorNoSuchType(value: T)

Bases: Node[NoSuchRelationshipTypeError]

The relationship’s type does not match any relationship element type in the graph type

class hydra.error.neo4j.InvalidRelationshipErrorStartNodeNotFound

Bases: object

The start node does not exist in the graph

class hydra.error.neo4j.InvalidRelationshipErrorUniquenessViolation(value: T)

Bases: Node[PropertyUniquenessError]

A property uniqueness constraint is violated

class hydra.error.neo4j.InvalidRelationshipErrorWrongPropertyType(value: T)

Bases: Node[PropertyTypeError]

A property of the relationship violates a property type constraint

class hydra.error.neo4j.KeyError(properties: Annotated[Sequence[Key], 'The properties that constitute the key'])

Bases: object

An error indicating that a key constraint is violated: the listed properties do not all exist, or their combined values are not unique.

class Builder(_properties: 'Sequence[hydra.neo4j.model.Key]' = None)

Bases: object

build()
properties(properties)
PROPERTIES = Name(value='properties')
TYPE_ = Name(value='hydra.error.neo4j.KeyError')
static builder()
properties: Annotated[Sequence[Key], 'The properties that constitute the key']
with_properties(properties)
class hydra.error.neo4j.MissingLabelError(label: Annotated[NodeLabel, 'The implied label that was not present on the node'])

Bases: object

An error indicating that a node is missing a label implied by its node element type.

class Builder(_label: 'hydra.neo4j.model.NodeLabel' = None)

Bases: object

build()
label(label)
LABEL = Name(value='label')
TYPE_ = Name(value='hydra.error.neo4j.MissingLabelError')
static builder()
label: Annotated[NodeLabel, 'The implied label that was not present on the node']
with_label(label)
class hydra.error.neo4j.NoMatchingPatternError(allowed_patterns: Annotated[Sequence[RelationshipPattern], "The declared source/target label patterns for the relationship's type"], actual_start_labels: Annotated[Sequence[NodeLabel], "The labels of the relationship's actual start node"], actual_end_labels: Annotated[Sequence[NodeLabel], "The labels of the relationship's actual end node"])

Bases: object

An error indicating that a relationship’s endpoint labels match none of the declared source/target patterns for its relationship type.

ACTUAL_END_LABELS = Name(value='actualEndLabels')
ACTUAL_START_LABELS = Name(value='actualStartLabels')
ALLOWED_PATTERNS = Name(value='allowedPatterns')
class Builder(_allowed_patterns: 'Sequence[RelationshipPattern]' = None, _actual_start_labels: 'Sequence[hydra.neo4j.model.NodeLabel]' = None, _actual_end_labels: 'Sequence[hydra.neo4j.model.NodeLabel]' = None)

Bases: object

actual_end_labels(actual_end_labels)
actual_start_labels(actual_start_labels)
allowed_patterns(allowed_patterns)
build()
TYPE_ = Name(value='hydra.error.neo4j.NoMatchingPatternError')
actual_end_labels: Annotated[Sequence[NodeLabel], "The labels of the relationship's actual end node"]
actual_start_labels: Annotated[Sequence[NodeLabel], "The labels of the relationship's actual start node"]
allowed_patterns: Annotated[Sequence[RelationshipPattern], "The declared source/target label patterns for the relationship's type"]
static builder()
with_actual_end_labels(actual_end_labels)
with_actual_start_labels(actual_start_labels)
with_allowed_patterns(allowed_patterns)
class hydra.error.neo4j.NoSuchLabelError(labels: Annotated[Sequence[NodeLabel], 'The labels of the node for which no node element type was found'])

Bases: object

An error indicating that no node element type matches a node’s labels.

class Builder(_labels: 'Sequence[hydra.neo4j.model.NodeLabel]' = None)

Bases: object

build()
labels(labels)
LABELS = Name(value='labels')
TYPE_ = Name(value='hydra.error.neo4j.NoSuchLabelError')
static builder()
labels: Annotated[Sequence[NodeLabel], 'The labels of the node for which no node element type was found']
with_labels(labels)
class hydra.error.neo4j.NoSuchRelationshipTypeError(type: Annotated[RelationshipType, 'The relationship type that was not found'])

Bases: object

An error indicating that a relationship type does not match any relationship element type.

class Builder(_type: 'hydra.neo4j.model.RelationshipType' = None)

Bases: object

build()
type(type)
TYPE = Name(value='type')
TYPE_ = Name(value='hydra.error.neo4j.NoSuchRelationshipTypeError')
static builder()
type: Annotated[RelationshipType, 'The relationship type that was not found']
with_type(type)
class hydra.error.neo4j.PropertyExistenceError(key: Annotated[Key, 'The key of the missing property'])

Bases: object

An error indicating that an element is missing a property required by a property existence constraint.

class Builder(_key: 'hydra.neo4j.model.Key' = None)

Bases: object

build()
key(key)
KEY = Name(value='key')
TYPE_ = Name(value='hydra.error.neo4j.PropertyExistenceError')
static builder()
key: Annotated[Key, 'The key of the missing property']
with_key(key)
class hydra.error.neo4j.PropertyTypeError(key: Annotated[Key, 'The key of the property'], expected_type: Annotated[ValueType, "The type the property's value was required to have"], value: Annotated[Value, 'The actual value of the property'])

Bases: object

An error indicating that a property’s value violates a property type constraint.

class Builder(_key: 'hydra.neo4j.model.Key' = None, _expected_type: 'hydra.neo4j.model.ValueType' = None, _value: 'hydra.neo4j.model.Value' = None)

Bases: object

build()
expected_type(expected_type)
key(key)
value(value)
EXPECTED_TYPE = Name(value='expectedType')
KEY = Name(value='key')
TYPE_ = Name(value='hydra.error.neo4j.PropertyTypeError')
VALUE = Name(value='value')
static builder()
expected_type: Annotated[ValueType, "The type the property's value was required to have"]
key: Annotated[Key, 'The key of the property']
value: Annotated[Value, 'The actual value of the property']
with_expected_type(expected_type)
with_key(key)
with_value(value)
class hydra.error.neo4j.PropertyUniquenessError(properties: Annotated[Sequence[Key], 'The properties whose combined values must be unique'])

Bases: object

An error indicating that a property uniqueness constraint is violated: the combined values of the listed properties are not unique.

class Builder(_properties: 'Sequence[hydra.neo4j.model.Key]' = None)

Bases: object

build()
properties(properties)
PROPERTIES = Name(value='properties')
TYPE_ = Name(value='hydra.error.neo4j.PropertyUniquenessError')
static builder()
properties: Annotated[Sequence[Key], 'The properties whose combined values must be unique']
with_properties(properties)
class hydra.error.neo4j.RelationshipPattern(start_label: Annotated[NodeLabel, 'The required start-node label'], end_label: Annotated[NodeLabel, 'The required end-node label'])

Bases: object

A declared source/target label pattern for a relationship type, used in NoMatchingPatternError.

class Builder(_start_label: 'hydra.neo4j.model.NodeLabel' = None, _end_label: 'hydra.neo4j.model.NodeLabel' = None)

Bases: object

build()
end_label(end_label)
start_label(start_label)
END_LABEL = Name(value='endLabel')
START_LABEL = Name(value='startLabel')
TYPE_ = Name(value='hydra.error.neo4j.RelationshipPattern')
static builder()
end_label: Annotated[NodeLabel, 'The required end-node label']
start_label: Annotated[NodeLabel, 'The required start-node label']
with_end_label(end_label)
with_start_label(start_label)