Skip to content

Commit

Permalink
Merge pull request #9 from bmeg/fix/vertex-rel-addition
Browse files Browse the repository at this point in the history
fixes an issue where not all rels made it into vertex
  • Loading branch information
matthewpeterkort authored Sep 10, 2024
2 parents 713fabc + 66a62e0 commit cdd8a41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/gen_graph/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var gzip_files bool

// https://github.com/bmeg/sifter/blob/51a67b0de852e429d30b9371d9975dbefe3a8df9/transform/graph_build.go#L86
var Cmd = &cobra.Command{
Use: "gen-graph [schema dir] [data dir] [out dir] [class name]",
Use: "gen-graph [schema dir or schema file] [data dir] [out dir] [class name]",
Short: "Generates edges and vertices from source data files and schemas",
Args: cobra.MinimumNArgs(4),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
8 changes: 3 additions & 5 deletions util/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,10 @@ func (s GraphSchema) Generate(classID string, data map[string]any, clean bool, p
}
}
for name := range class.Properties {
// gather compare to a list of rels so that the vertexes don't include edge reference information
if !contains(ListOfRels, name) {
if d, ok := data[name]; ok {
vData[name] = d
}
if d, ok := data[name]; ok {
vData[name] = d
}

}
if project_id != "" {
project_parts := strings.Split(project_id, "-")
Expand Down

0 comments on commit cdd8a41

Please sign in to comment.