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:
objectConstraintKey | 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:
objectA 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()
- 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:
objectElementNode | 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.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:
objectA 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:
objectA 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:
objectA 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.
- PROPERTIES = Name(value='properties')
- TYPE_ = Name(value='hydra.neo4j.model.KeyConstraint')
- static builder()
- 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:
objectA 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:
objectA 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()
- 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:
objectA 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_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:
objectA 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']
- 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:
objectA 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()
- labels: Annotated[Set[NodeLabel], 'The set of labels of the node (a node may have zero or more labels)']
- 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:
objectA 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']
- 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:
objectA 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)']
- 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:
objectA 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)']
- class hydra.neo4j.model.PropertyExistenceConstraint(property: Annotated[Key, 'The property that must exist'])
Bases:
objectA property existence constraint: the given property must exist (be non-null).
- PROPERTY = Name(value='property')
- TYPE_ = Name(value='hydra.neo4j.model.PropertyExistenceConstraint')
- static builder()
- 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:
objectA 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()
- with_property(property)
- with_type(type)
- class hydra.neo4j.model.PropertyUniquenessConstraint(properties: Annotated[Sequence[Key], 'The properties whose combined values must be unique'])
Bases:
objectA 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.
- PROPERTIES = Name(value='properties')
- TYPE_ = Name(value='hydra.neo4j.model.PropertyUniquenessConstraint')
- static builder()
- 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:
objectA 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()
- 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:
objectA 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']
- 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:
objectOne 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()
- 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:
objectValueBoolean | 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.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.ValueLocalDateTime(value: T)
Bases:
Node[LocalDateTime]A date and time without a zone
- class hydra.neo4j.model.ValueLocalTime(value: T)
-
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.ValueNull
Bases:
objectA null value
- class hydra.neo4j.model.ValueRelationship(value: T)
Bases:
Node[Relationship]A relationship
- class hydra.neo4j.model.ValueTime(value: T)
Bases:
Node[OffsetTime]A time of day with a UTC offset
- class hydra.neo4j.model.ValueType
Bases:
objectValueTypeBoolean | 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:
objectThe BOOLEAN type
- class hydra.neo4j.model.ValueTypeDate
Bases:
objectThe DATE type
- class hydra.neo4j.model.ValueTypeDuration
Bases:
objectThe DURATION type
- class hydra.neo4j.model.ValueTypeFloat
Bases:
objectThe FLOAT type
- class hydra.neo4j.model.ValueTypeInteger
Bases:
objectThe INTEGER type
- class hydra.neo4j.model.ValueTypeList(value: T)
-
A LIST type, with the given element type
- class hydra.neo4j.model.ValueTypeLocalDateTime
Bases:
objectThe LOCAL DATETIME type
- class hydra.neo4j.model.ValueTypeLocalTime
Bases:
objectThe LOCAL TIME type
- class hydra.neo4j.model.ValueTypePoint
Bases:
objectThe POINT type
- class hydra.neo4j.model.ValueTypeString
Bases:
objectThe 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:
objectThe ZONED DATETIME type
- class hydra.neo4j.model.ValueTypeZonedTime
Bases:
objectThe 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:
objectA 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']
- 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:
objectA 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)