hydra.neo4j.model module

A data model for Neo4j-flavored property graphs, aligned with the types of the Neo4j Java driver (org.neo4j.driver) at the instance level and with Neo4j’s constraints and graph types at the schema level.

class hydra.neo4j.model.Constraint

Bases: object

ConstraintKey | ConstraintPropertyExistence | ConstraintPropertyType | ConstraintPropertyUniqueness

KEY = Name(value='key')
PROPERTY_EXISTENCE = Name(value='propertyExistence')
PROPERTY_TYPE = Name(value='propertyType')
PROPERTY_UNIQUENESS = Name(value='propertyUniqueness')
TYPE_ = Name(value='hydra.neo4j.model.Constraint')
class hydra.neo4j.model.ConstraintDefinition(name: Annotated[object, 'An optional name for the constraint'], body: Annotated[Constraint, 'The constraint itself'])

Bases: object

A named constraint. The name is optional at authoring time; Neo4j auto-generates one if it is not supplied. The name is operational metadata (used to reference the constraint for dropping, idempotent creation, and reporting) and has no effect on what the constraint enforces.

BODY = Name(value='body')
class Builder(_name: 'Optional[str]' = None, _body: 'Constraint' = None)

Bases: object

body(body)
build()
name(name)
NAME = Name(value='name')
TYPE_ = Name(value='hydra.neo4j.model.ConstraintDefinition')
body: Annotated[Constraint, 'The constraint itself']
static builder()
name: Annotated[object, 'An optional name for the constraint']
with_body(body)
with_name(name)
class hydra.neo4j.model.ConstraintKey(value: T)

Bases: Node[KeyConstraint]

A key constraint

class hydra.neo4j.model.ConstraintPropertyExistence(value: T)

Bases: Node[PropertyExistenceConstraint]

A property existence constraint

class hydra.neo4j.model.ConstraintPropertyType(value: T)

Bases: Node[PropertyTypeConstraint]

A property type constraint

class hydra.neo4j.model.ConstraintPropertyUniqueness(value: T)

Bases: Node[PropertyUniquenessConstraint]

A property uniqueness constraint

class hydra.neo4j.model.Element

Bases: object

ElementNode | ElementRelationship

NODE = Name(value='node')
RELATIONSHIP = Name(value='relationship')
TYPE_ = Name(value='hydra.neo4j.model.Element')
class hydra.neo4j.model.ElementId(value: T)

Bases: Node[str]

The element id of a node or relationship (the driver’s String-valued elementId()).

TYPE_ = Name(value='hydra.neo4j.model.ElementId')
class hydra.neo4j.model.ElementNode(value: T)

Bases: Node[Node_]

The element is a node

class hydra.neo4j.model.ElementRelationship(value: T)

Bases: Node[Relationship]

The element is a relationship

class hydra.neo4j.model.GraphType(nodes: Annotated[Sequence[NodeElementType], 'The node element types of the graph type'], relationships: Annotated[Sequence[RelationshipElementType], 'The relationship element types of the graph type'])

Bases: object

A Neo4j graph type: a holistic schema for a graph, made up of node element types and relationship element types (Neo4j’s GRAPH TYPE feature).

class Builder(_nodes: 'Sequence[NodeElementType]' = None, _relationships: 'Sequence[RelationshipElementType]' = None)

Bases: object

build()
nodes(nodes)
relationships(relationships)
NODES = Name(value='nodes')
RELATIONSHIPS = Name(value='relationships')
TYPE_ = Name(value='hydra.neo4j.model.GraphType')
static builder()
nodes: Annotated[Sequence[NodeElementType], 'The node element types of the graph type']
relationships: Annotated[Sequence[RelationshipElementType], 'The relationship element types of the graph type']
with_nodes(nodes)
with_relationships(relationships)
class hydra.neo4j.model.IsoDuration(months: Annotated[int, 'A number of months'], days: Annotated[int, 'A number of days'], seconds: Annotated[int, 'A number of seconds'], nanoseconds: Annotated[int, 'A number of nanoseconds of the second'])

Bases: object

A temporal amount, following the Neo4j driver’s IsoDuration. The four components are kept separate and non-normalized, since a month is not a fixed number of days.

class Builder(_months: 'int' = None, _days: 'int' = None, _seconds: 'int' = None, _nanoseconds: 'int' = None)

Bases: object

build()
days(days)
months(months)
nanoseconds(nanoseconds)
seconds(seconds)
DAYS = Name(value='days')
MONTHS = Name(value='months')
NANOSECONDS = Name(value='nanoseconds')
SECONDS = Name(value='seconds')
TYPE_ = Name(value='hydra.neo4j.model.IsoDuration')
static builder()
days: Annotated[int, 'A number of days']
months: Annotated[int, 'A number of months']
nanoseconds: Annotated[int, 'A number of nanoseconds of the second']
seconds: Annotated[int, 'A number of seconds']
with_days(days)
with_months(months)
with_nanoseconds(nanoseconds)
with_seconds(seconds)
class hydra.neo4j.model.Key(value: T)

Bases: Node[str]

A key in a property map or value map. Used for all maps, following the driver’s single key notion (MapAccessor.keys()/get(String key)); there is no distinct “property key” type.

TYPE_ = Name(value='hydra.neo4j.model.Key')
class hydra.neo4j.model.KeyConstraint(properties: Annotated[Sequence[Key], 'The properties whose combination must exist and be unique'])

Bases: object

A key constraint: the listed properties must all exist and their combined values must be unique. Neo4j’s primary-key analog, combining existence and uniqueness over a set of properties. Applies to a node label or a relationship type depending on where it is attached.

class Builder(_properties: 'Sequence[Key]' = None)

Bases: object

build()
properties(properties)
PROPERTIES = Name(value='properties')
TYPE_ = Name(value='hydra.neo4j.model.KeyConstraint')
static builder()
properties: Annotated[Sequence[Key], 'The properties whose combination must exist and be unique']
with_properties(properties)
class hydra.neo4j.model.LocalDate(year: Annotated[int, 'The year'], month: Annotated[int, 'The month of the year'], day: Annotated[int, 'The day of the month'])

Bases: object

A date without a time or time zone, following java.time.LocalDate (the driver’s asLocalDate()).

class Builder(_year: 'int' = None, _month: 'int' = None, _day: 'int' = None)

Bases: object

build()
day(day)
month(month)
year(year)
DAY = Name(value='day')
MONTH = Name(value='month')
TYPE_ = Name(value='hydra.neo4j.model.LocalDate')
YEAR = Name(value='year')
static builder()
day: Annotated[int, 'The day of the month']
month: Annotated[int, 'The month of the year']
with_day(day)
with_month(month)
with_year(year)
year: Annotated[int, 'The year']
class hydra.neo4j.model.LocalDateTime(date: Annotated[LocalDate, 'The date part'], time: Annotated[LocalTime, 'The time part'])

Bases: object

A date and time without a time zone, following java.time.LocalDateTime (the driver’s asLocalDateTime()).

class Builder(_date: 'LocalDate' = None, _time: 'LocalTime' = None)

Bases: object

build()
date(date)
time(time)
DATE = Name(value='date')
TIME = Name(value='time')
TYPE_ = Name(value='hydra.neo4j.model.LocalDateTime')
static builder()
date: Annotated[LocalDate, 'The date part']
time: Annotated[LocalTime, 'The time part']
with_date(date)
with_time(time)
class hydra.neo4j.model.LocalTime(hour: Annotated[int, 'The hour of the day'], minute: Annotated[int, 'The minute of the hour'], second: Annotated[int, 'The second of the minute'], nanosecond: Annotated[int, 'The nanosecond of the second'])

Bases: object

A time of day without a time zone, following java.time.LocalTime (the driver’s asLocalTime()).

class Builder(_hour: 'int' = None, _minute: 'int' = None, _second: 'int' = None, _nanosecond: 'int' = None)

Bases: object

build()
hour(hour)
minute(minute)
nanosecond(nanosecond)
second(second)
HOUR = Name(value='hour')
MINUTE = Name(value='minute')
NANOSECOND = Name(value='nanosecond')
SECOND = Name(value='second')
TYPE_ = Name(value='hydra.neo4j.model.LocalTime')
static builder()
hour: Annotated[int, 'The hour of the day']
minute: Annotated[int, 'The minute of the hour']
nanosecond: Annotated[int, 'The nanosecond of the second']
second: Annotated[int, 'The second of the minute']
with_hour(hour)
with_minute(minute)
with_nanosecond(nanosecond)
with_second(second)
class hydra.neo4j.model.Neo4jMapping(encode_id: Annotated[Callable[[V], object], 'Encode a property-graph value as a Neo4j element id'], decode_id: Annotated[Callable[[ElementId], object], 'Decode a Neo4j element id as a property-graph value'], encode_value: Annotated[Callable[[V], object], 'Encode a property-graph value as a Neo4j property value'], decode_value: Annotated[Callable[[Value], object], 'Decode a Neo4j property value as a property-graph value'])

Bases: Generic[V]

The caller-supplied conversions a mapping between Hydra’s property-graph model (hydra.pg.model) and this Neo4j model needs: a pair of partial functions converting property-graph values to and from Neo4j element ids, and another pair converting them to and from Neo4j property values. Errors are plain strings for now; once issue #518 generalizes the kernel Coder, these four fields collapse to two Coders. Failures (e.g. a value with no Neo4j representation) surface via the Either.

class Builder(_encode_id: 'Callable[[V], Either[str, ElementId]]' = None, _decode_id: 'Callable[[ElementId], Either[str, V]]' = None, _encode_value: 'Callable[[V], Either[str, Value]]' = None, _decode_value: 'Callable[[Value], Either[str, V]]' = None)

Bases: Generic[V]

build()
decode_id(decode_id)
decode_value(decode_value)
encode_id(encode_id)
encode_value(encode_value)
DECODE_ID = Name(value='decodeId')
DECODE_VALUE = Name(value='decodeValue')
ENCODE_ID = Name(value='encodeId')
ENCODE_VALUE = Name(value='encodeValue')
TYPE_ = Name(value='hydra.neo4j.model.Neo4jMapping')
static builder()
decode_id: Annotated[Callable[[ElementId], object], 'Decode a Neo4j element id as a property-graph value']
decode_value: Annotated[Callable[[Value], object], 'Decode a Neo4j property value as a property-graph value']
encode_id: Annotated[Callable[[V], object], 'Encode a property-graph value as a Neo4j element id']
encode_value: Annotated[Callable[[V], object], 'Encode a property-graph value as a Neo4j property value']
with_decode_id(decode_id)
with_decode_value(decode_value)
with_encode_id(encode_id)
with_encode_value(encode_value)
class hydra.neo4j.model.NodeElementType(identifying_label: Annotated[NodeLabel, 'The identifying label of the node element type'], implied_labels: Annotated[Set[NodeLabel], 'Labels that a node of this type must also have (label implication)'], constraints: Annotated[Sequence[ConstraintDefinition], 'The constraints on nodes of this type'])

Bases: object

A node element type within a graph type: an identifying label, any implied labels it entails, and the constraints on its properties. A node’s typed properties are expressed as property type constraints (and existence constraints for non-null ones), since Neo4j has no untyped property declaration.

class Builder(_identifying_label: 'NodeLabel' = None, _implied_labels: 'Set[NodeLabel]' = None, _constraints: 'Sequence[ConstraintDefinition]' = None)

Bases: object

build()
constraints(constraints)
identifying_label(identifying_label)
implied_labels(implied_labels)
CONSTRAINTS = Name(value='constraints')
IDENTIFYING_LABEL = Name(value='identifyingLabel')
IMPLIED_LABELS = Name(value='impliedLabels')
TYPE_ = Name(value='hydra.neo4j.model.NodeElementType')
static builder()
constraints: Annotated[Sequence[ConstraintDefinition], 'The constraints on nodes of this type']
identifying_label: Annotated[NodeLabel, 'The identifying label of the node element type']
implied_labels: Annotated[Set[NodeLabel], 'Labels that a node of this type must also have (label implication)']
with_constraints(constraints)
with_identifying_label(identifying_label)
with_implied_labels(implied_labels)
class hydra.neo4j.model.NodeLabel(value: T)

Bases: Node[str]

A label applied to a node. Nodes carry a set of labels; relationships have a single type (see RelationshipType), so there is no relationship-label concept.

TYPE_ = Name(value='hydra.neo4j.model.NodeLabel')
class hydra.neo4j.model.Node_(id: Annotated[ElementId, 'The element id of the node'], labels: Annotated[Set[NodeLabel], 'The set of labels of the node (a node may have zero or more labels)'], properties: Annotated[Mapping[Key, Value], 'The properties of the node'])

Bases: object

A node; a graph element with a set of labels and a map of properties.

class Builder(_id: 'ElementId' = None, _labels: 'Set[NodeLabel]' = None, _properties: 'Mapping[Key, Value]' = None)

Bases: object

build()
id(id)
labels(labels)
properties(properties)
ID = Name(value='id')
LABELS = Name(value='labels')
PROPERTIES = Name(value='properties')
TYPE_ = Name(value='hydra.neo4j.model.Node')
static builder()
id: Annotated[ElementId, 'The element id of the node']
labels: Annotated[Set[NodeLabel], 'The set of labels of the node (a node may have zero or more labels)']
properties: Annotated[Mapping[Key, Value], 'The properties of the node']
with_id(id)
with_labels(labels)
with_properties(properties)
class hydra.neo4j.model.OffsetTime(time: Annotated[LocalTime, 'The local time'], offset: Annotated[ZoneOffset, 'The offset from UTC'])

Bases: object

A time of day with a UTC offset, following java.time.OffsetTime (the driver’s asOffsetTime()). Distinct from LocalTime by virtue of the offset.

class Builder(_time: 'LocalTime' = None, _offset: 'ZoneOffset' = None)

Bases: object

build()
offset(offset)
time(time)
OFFSET = Name(value='offset')
TIME = Name(value='time')
TYPE_ = Name(value='hydra.neo4j.model.OffsetTime')
static builder()
offset: Annotated[ZoneOffset, 'The offset from UTC']
time: Annotated[LocalTime, 'The local time']
with_offset(offset)
with_time(time)
class hydra.neo4j.model.Path(start: Annotated[Node_, 'The first node of the path'], segments: Annotated[Sequence[Segment], 'The segments of the path, in order (empty for a zero-length path)'])

Bases: object

A path through the graph: a start node followed by a sequence of segments. The node sequence is the start node followed by each segment’s end node; a zero-length path has an empty segment list. Each segment carries full node and relationship objects, so a path is self-contained.

class Builder(_start: 'Node_' = None, _segments: 'Sequence[Segment]' = None)

Bases: object

build()
segments(segments)
start(start)
SEGMENTS = Name(value='segments')
START = Name(value='start')
TYPE_ = Name(value='hydra.neo4j.model.Path')
static builder()
segments: Annotated[Sequence[Segment], 'The segments of the path, in order (empty for a zero-length path)']
start: Annotated[Node_, 'The first node of the path']
with_segments(segments)
with_start(start)
class hydra.neo4j.model.Point(srid: Annotated[SpatialReferenceIdentifier, 'The identifier of the coordinate reference system for this point'], x: Annotated[float, 'The x coordinate (longitude under WGS-84)'], y: Annotated[float, 'The y coordinate (latitude under WGS-84)'], z: Annotated[object, 'The z coordinate (height under WGS-84); absent for a two-dimensional point'])

Bases: object

A spatial point, following the Neo4j driver’s Point. The coordinate reference system is given by the srid, which also determines the units and dimensionality: under WGS-84 (srid 4326/4979), x is longitude and y is latitude in decimal degrees and z is height in meters; under Cartesian (srid 7203/9157), the units are unspecified. A two-dimensional point omits z.

class Builder(_srid: 'SpatialReferenceIdentifier' = None, _x: 'float' = None, _y: 'float' = None, _z: 'Optional[float]' = None)

Bases: object

build()
srid(srid)
x(x)
y(y)
z(z)
SRID = Name(value='srid')
TYPE_ = Name(value='hydra.neo4j.model.Point')
X = Name(value='x')
Y = Name(value='y')
Z = Name(value='z')
static builder()
srid: Annotated[SpatialReferenceIdentifier, 'The identifier of the coordinate reference system for this point']
with_srid(srid)
with_x(x)
with_y(y)
with_z(z)
x: Annotated[float, 'The x coordinate (longitude under WGS-84)']
y: Annotated[float, 'The y coordinate (latitude under WGS-84)']
z: Annotated[object, 'The z coordinate (height under WGS-84); absent for a two-dimensional point']
class hydra.neo4j.model.PropertyExistenceConstraint(property: Annotated[Key, 'The property that must exist'])

Bases: object

A property existence constraint: the given property must exist (be non-null).

class Builder(_property: 'Key' = None)

Bases: object

build()
property(property)
PROPERTY = Name(value='property')
TYPE_ = Name(value='hydra.neo4j.model.PropertyExistenceConstraint')
static builder()
property: Annotated[Key, 'The property that must exist']
with_property(property)
class hydra.neo4j.model.PropertyTypeConstraint(property: Annotated[Key, 'The property that is constrained'], type: Annotated[ValueType, "The type the property's value must have"])

Bases: object

A property type constraint: the given property must have the given value type.

class Builder(_property: 'Key' = None, _type: 'ValueType' = None)

Bases: object

build()
property(property)
type(type)
PROPERTY = Name(value='property')
TYPE = Name(value='type')
TYPE_ = Name(value='hydra.neo4j.model.PropertyTypeConstraint')
static builder()
property: Annotated[Key, 'The property that is constrained']
type: Annotated[ValueType, "The type the property's value must have"]
with_property(property)
with_type(type)
class hydra.neo4j.model.PropertyUniquenessConstraint(properties: Annotated[Sequence[Key], 'The properties whose combined values must be unique'])

Bases: object

A property uniqueness constraint: the combined values of the listed properties must be unique. Unlike a key constraint, it does not require the properties to exist.

class Builder(_properties: 'Sequence[Key]' = None)

Bases: object

build()
properties(properties)
PROPERTIES = Name(value='properties')
TYPE_ = Name(value='hydra.neo4j.model.PropertyUniquenessConstraint')
static builder()
properties: Annotated[Sequence[Key], 'The properties whose combined values must be unique']
with_properties(properties)
class hydra.neo4j.model.Relationship(id: Annotated[ElementId, 'The element id of the relationship'], properties: Annotated[Mapping[Key, Value], 'The properties of the relationship'], type: Annotated[RelationshipType, 'The type of the relationship'], start: Annotated[ElementId, 'The element id of the start node'], end: Annotated[ElementId, 'The element id of the end node'])

Bases: object

A relationship; a directed graph element with a single type, connecting a start node to an end node. Relationships are always stored directed; undirected traversal is a query-level concern.

class Builder(_id: 'ElementId' = None, _properties: 'Mapping[Key, Value]' = None, _type: 'RelationshipType' = None, _start: 'ElementId' = None, _end: 'ElementId' = None)

Bases: object

build()
end(end)
id(id)
properties(properties)
start(start)
type(type)
END = Name(value='end')
ID = Name(value='id')
PROPERTIES = Name(value='properties')
START = Name(value='start')
TYPE = Name(value='type')
TYPE_ = Name(value='hydra.neo4j.model.Relationship')
static builder()
end: Annotated[ElementId, 'The element id of the end node']
id: Annotated[ElementId, 'The element id of the relationship']
properties: Annotated[Mapping[Key, Value], 'The properties of the relationship']
start: Annotated[ElementId, 'The element id of the start node']
type: Annotated[RelationshipType, 'The type of the relationship']
with_end(end)
with_id(id)
with_properties(properties)
with_start(start)
with_type(type)
class hydra.neo4j.model.RelationshipElementType(type: Annotated[RelationshipType, 'The relationship type'], start_label: Annotated[NodeLabel, 'The label of the start node'], end_label: Annotated[NodeLabel, 'The label of the end node'], constraints: Annotated[Sequence[ConstraintDefinition], 'The constraints on relationships of this type'])

Bases: object

A relationship element type within a graph type: a relationship type, the node labels it may connect, and the constraints on its properties.

class Builder(_type: 'RelationshipType' = None, _start_label: 'NodeLabel' = None, _end_label: 'NodeLabel' = None, _constraints: 'Sequence[ConstraintDefinition]' = None)

Bases: object

build()
constraints(constraints)
end_label(end_label)
start_label(start_label)
type(type)
CONSTRAINTS = Name(value='constraints')
END_LABEL = Name(value='endLabel')
START_LABEL = Name(value='startLabel')
TYPE = Name(value='type')
TYPE_ = Name(value='hydra.neo4j.model.RelationshipElementType')
static builder()
constraints: Annotated[Sequence[ConstraintDefinition], 'The constraints on relationships of this type']
end_label: Annotated[NodeLabel, 'The label of the end node']
start_label: Annotated[NodeLabel, 'The label of the start node']
type: Annotated[RelationshipType, 'The relationship type']
with_constraints(constraints)
with_end_label(end_label)
with_start_label(start_label)
with_type(type)
class hydra.neo4j.model.RelationshipType(value: T)

Bases: Node[str]

The type of a relationship. A relationship has exactly one type.

TYPE_ = Name(value='hydra.neo4j.model.RelationshipType')
class hydra.neo4j.model.Segment(relationship: Annotated[Relationship, 'The relationship traversed in this segment'], end: Annotated[Node_, 'The node this segment arrives at'])

Bases: object

One step of a path: a relationship and the node it arrives at. The segment’s implicit start is the previous segment’s end node, or the path’s start node for the first segment, so it is not stored here.

class Builder(_relationship: 'Relationship' = None, _end: 'Node_' = None)

Bases: object

build()
end(end)
relationship(relationship)
END = Name(value='end')
RELATIONSHIP = Name(value='relationship')
TYPE_ = Name(value='hydra.neo4j.model.Segment')
static builder()
end: Annotated[Node_, 'The node this segment arrives at']
relationship: Annotated[Relationship, 'The relationship traversed in this segment']
with_end(end)
with_relationship(relationship)
class hydra.neo4j.model.SpatialReferenceIdentifier(value: T)

Bases: Node[int]

A spatial reference identifier (SRID): an integer naming the coordinate reference system in which a point’s coordinates are expressed. Neo4j supports four: WGS-84 (4326), WGS-84 3D (4979), Cartesian (7203), and Cartesian 3D (9157).

TYPE_ = Name(value='hydra.neo4j.model.SpatialReferenceIdentifier')
class hydra.neo4j.model.Value

Bases: object

ValueBoolean | ValueBytes | ValueDate | ValueDateTime | ValueDuration | ValueFloat | ValueInteger | ValueList | ValueLocalDateTime | ValueLocalTime | ValueMap | ValueNode | ValueNull | ValuePath | ValuePoint | ValueRelationship | ValueString | ValueTime

BOOLEAN = Name(value='boolean')
BYTES = Name(value='bytes')
DATE = Name(value='date')
DATE_TIME = Name(value='dateTime')
DURATION = Name(value='duration')
FLOAT = Name(value='float')
INTEGER = Name(value='integer')
LIST = Name(value='list')
LOCAL_DATE_TIME = Name(value='localDateTime')
LOCAL_TIME = Name(value='localTime')
MAP = Name(value='map')
NODE = Name(value='node')
NULL = Name(value='null')
PATH = Name(value='path')
POINT = Name(value='point')
RELATIONSHIP = Name(value='relationship')
STRING = Name(value='string')
TIME = Name(value='time')
TYPE_ = Name(value='hydra.neo4j.model.Value')
class hydra.neo4j.model.ValueBoolean(value: T)

Bases: Node[bool]

A boolean value

class hydra.neo4j.model.ValueBytes(value: T)

Bases: Node[bytes]

A byte array

class hydra.neo4j.model.ValueDate(value: T)

Bases: Node[LocalDate]

A date

class hydra.neo4j.model.ValueDateTime(value: T)

Bases: Node[ZonedDateTime]

A date and time with a zone

class hydra.neo4j.model.ValueDuration(value: T)

Bases: Node[IsoDuration]

A temporal amount

class hydra.neo4j.model.ValueFloat(value: T)

Bases: Node[float]

A 64-bit floating-point number

class hydra.neo4j.model.ValueInteger(value: T)

Bases: Node[int]

A 64-bit integer

class hydra.neo4j.model.ValueList(value: T)

Bases: Node[Sequence[Value]]

A list of values

class hydra.neo4j.model.ValueLocalDateTime(value: T)

Bases: Node[LocalDateTime]

A date and time without a zone

class hydra.neo4j.model.ValueLocalTime(value: T)

Bases: Node[LocalTime]

A time of day without a zone

class hydra.neo4j.model.ValueMap(value: T)

Bases: Node[Mapping[Key, Value]]

A map from keys to values

class hydra.neo4j.model.ValueNode(value: T)

Bases: Node[Node_]

A node

class hydra.neo4j.model.ValueNull

Bases: object

A null value

class hydra.neo4j.model.ValuePath(value: T)

Bases: Node[Path]

A path

class hydra.neo4j.model.ValuePoint(value: T)

Bases: Node[Point]

A spatial point

class hydra.neo4j.model.ValueRelationship(value: T)

Bases: Node[Relationship]

A relationship

class hydra.neo4j.model.ValueString(value: T)

Bases: Node[str]

A string value

class hydra.neo4j.model.ValueTime(value: T)

Bases: Node[OffsetTime]

A time of day with a UTC offset

class hydra.neo4j.model.ValueType

Bases: object

ValueTypeBoolean | ValueTypeString | ValueTypeInteger | ValueTypeFloat | ValueTypeDate | ValueTypeLocalTime | ValueTypeZonedTime | ValueTypeLocalDateTime | ValueTypeZonedDateTime | ValueTypeDuration | ValueTypePoint | ValueTypeList | ValueTypeVector | ValueTypeUnion

BOOLEAN = Name(value='boolean')
DATE = Name(value='date')
DURATION = Name(value='duration')
FLOAT = Name(value='float')
INTEGER = Name(value='integer')
LIST = Name(value='list')
LOCAL_DATE_TIME = Name(value='localDateTime')
LOCAL_TIME = Name(value='localTime')
POINT = Name(value='point')
STRING = Name(value='string')
TYPE_ = Name(value='hydra.neo4j.model.ValueType')
UNION = Name(value='union')
VECTOR = Name(value='vector')
ZONED_DATE_TIME = Name(value='zonedDateTime')
ZONED_TIME = Name(value='zonedTime')
class hydra.neo4j.model.ValueTypeBoolean

Bases: object

The BOOLEAN type

class hydra.neo4j.model.ValueTypeDate

Bases: object

The DATE type

class hydra.neo4j.model.ValueTypeDuration

Bases: object

The DURATION type

class hydra.neo4j.model.ValueTypeFloat

Bases: object

The FLOAT type

class hydra.neo4j.model.ValueTypeInteger

Bases: object

The INTEGER type

class hydra.neo4j.model.ValueTypeList(value: T)

Bases: Node[ValueType]

A LIST type, with the given element type

class hydra.neo4j.model.ValueTypeLocalDateTime

Bases: object

The LOCAL DATETIME type

class hydra.neo4j.model.ValueTypeLocalTime

Bases: object

The LOCAL TIME type

class hydra.neo4j.model.ValueTypePoint

Bases: object

The POINT type

class hydra.neo4j.model.ValueTypeString

Bases: object

The STRING type

class hydra.neo4j.model.ValueTypeUnion(value: T)

Bases: Node[Sequence[ValueType]]

A closed union of the given types

class hydra.neo4j.model.ValueTypeVector(value: T)

Bases: Node[VectorType]

A VECTOR type, with an element type and a dimension

class hydra.neo4j.model.ValueTypeZonedDateTime

Bases: object

The ZONED DATETIME type

class hydra.neo4j.model.ValueTypeZonedTime

Bases: object

The ZONED TIME type

class hydra.neo4j.model.VectorType(element: Annotated[ValueType, 'The element type of the vector'], dimension: Annotated[int, 'The dimension (length) of the vector'])

Bases: object

A Neo4j VECTOR type: an element type and a fixed dimension.

class Builder(_element: 'ValueType' = None, _dimension: 'int' = None)

Bases: object

build()
dimension(dimension)
element(element)
DIMENSION = Name(value='dimension')
ELEMENT = Name(value='element')
TYPE_ = Name(value='hydra.neo4j.model.VectorType')
static builder()
dimension: Annotated[int, 'The dimension (length) of the vector']
element: Annotated[ValueType, 'The element type of the vector']
with_dimension(dimension)
with_element(element)
class hydra.neo4j.model.ZoneId(value: T)

Bases: Node[str]

A time-zone identifier, following java.time.ZoneId: an IANA region id such as “Europe/Paris” (it may also be a fixed-offset string).

TYPE_ = Name(value='hydra.neo4j.model.ZoneId')
class hydra.neo4j.model.ZoneOffset(value: T)

Bases: Node[int]

An offset from UTC, following java.time.ZoneOffset, expressed as a total number of seconds (for example, +01:00 is 3600).

TYPE_ = Name(value='hydra.neo4j.model.ZoneOffset')
class hydra.neo4j.model.ZonedDateTime(date_time: Annotated[LocalDateTime, 'The local date and time'], offset: Annotated[ZoneOffset, 'The resolved offset from UTC at this instant'], zone: Annotated[ZoneId, 'The time zone'])

Bases: object

A date and time with a time zone, following java.time.ZonedDateTime (the driver’s asZonedDateTime()). It keeps both the resolved offset and the zone: the zone determines the offset rules, while the offset is the concrete UTC delta at this instant.

class Builder(_date_time: 'LocalDateTime' = None, _offset: 'ZoneOffset' = None, _zone: 'ZoneId' = None)

Bases: object

build()
date_time(date_time)
offset(offset)
zone(zone)
DATE_TIME = Name(value='dateTime')
OFFSET = Name(value='offset')
TYPE_ = Name(value='hydra.neo4j.model.ZonedDateTime')
ZONE = Name(value='zone')
static builder()
date_time: Annotated[LocalDateTime, 'The local date and time']
offset: Annotated[ZoneOffset, 'The resolved offset from UTC at this instant']
with_date_time(date_time)
with_offset(offset)
with_zone(zone)
zone: Annotated[ZoneId, 'The time zone']