wrote merge subgraph test

This commit is contained in:
jay
2026-11-27 08:27:11 -05:00
parent ffe11f9c36
commit d2eadd5cd7
3 changed files with 268 additions and 9 deletions
+6 -4
View File
@@ -4,6 +4,8 @@ import (
"context"
"fmt"
"github.com/neo4j/neo4j-go-driver/v6/neo4j"
"maps"
"slices"
"strings"
)
@@ -97,16 +99,16 @@ func (s *BatchSubgraph) RelCount() int {
func (s *BatchSubgraph) nodeKeys() []string {
keys := make([]string, 0, len(s.nodes))
for l := range s.nodes {
keys = append(keys, l)
for _, k := range slices.Sorted(maps.Keys(s.nodes)) {
keys = append(keys, k)
}
return keys
}
func (s *BatchSubgraph) relKeys() []string {
keys := make([]string, 0, len(s.rels))
for t := range s.rels {
keys = append(keys, t)
for _, k := range slices.Sorted(maps.Keys(s.rels)) {
keys = append(keys, k)
}
return keys
}