generated from alecodes/base-template
wip: implementing db initialization
This commit is contained in:
parent
ffd3c2014e
commit
140eef1fab
11 changed files with 451 additions and 0 deletions
18
pkg/node.go
Normal file
18
pkg/node.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package synchronizator
|
||||
|
||||
type Node struct {
|
||||
_conn *db
|
||||
Id int64
|
||||
_class string
|
||||
_relationships []*Relationship
|
||||
name string
|
||||
metadata any
|
||||
}
|
||||
|
||||
func (node *Node) AddRelation(metadata any, to int64) (*Relationship, error) {
|
||||
return node._conn.AddRelation(node.Id, metadata, to)
|
||||
}
|
||||
|
||||
type NodeIdentifier interface {
|
||||
int64 | Node
|
||||
}
|
||||
Reference in a new issue