wip: implementing db initialization

This commit is contained in:
Alexander Navarro 2024-11-13 19:55:02 +00:00
parent ffd3c2014e
commit 140eef1fab
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
11 changed files with 451 additions and 0 deletions

18
pkg/node.go Normal file
View 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
}