Started transforming tags into relationships.

This commit is contained in:
Jay
2025-02-24 11:45:23 -05:00
parent 1bb73d7712
commit 13724ce56f
7 changed files with 244 additions and 47 deletions

View File

@@ -38,8 +38,11 @@ func NewEventNode(id string) *Node {
return NewNode("Event", Properties{"id": id})
}
func NewTagNode(name string, value string) *Node {
return NewNode("Tag", Properties{"name": name, "value": value})
func NewTagNode(name string, value string, rest []string) *Node {
return NewNode("Tag", Properties{
"name": name,
"value": value,
"rest": rest})
}
// ========================================
@@ -59,6 +62,18 @@ func NewTaggedRel(
"TAGGED", "Event", "Tag", start, end, props)
}
func NewReferencesEventRel(
start *Node, end *Node, props Properties) *Relationship {
return NewRelationshipWithValidation(
"REFERENCES", "Event", "Event", start, end, props)
}
func NewReferencesUserRel(
start *Node, end *Node, props Properties) *Relationship {
return NewRelationshipWithValidation(
"REFERENCES", "Event", "User", start, end, props)
}
// ========================================
// Relationship Constructor Helpers
// ========================================