Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "dump <graph>", Short: "Dump vertices/edges from a graph", Long: ``, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { graph = args[0] conn, err := gripql.Connect(rpc.ConfigWithDefaults(host), true) if err != nil { return err } if vertexDump { q := gripql.V() elems, err := conn.Traversal(&gripql.GraphQuery{Graph: graph, Query: q.Statements}) if err != nil { return err } for v := range elems { txt, err := protojson.Marshal(v.GetVertex()) if err != nil { return err } fmt.Printf("%s\n", string(txt)) } } if edgeDump { q := gripql.E() elems, err := conn.Traversal(&gripql.GraphQuery{Graph: graph, Query: q.Statements}) if err != nil { return err } for v := range elems { txt, err := protojson.Marshal(v.GetEdge()) if err != nil { return err } fmt.Printf("%s\n", string(txt)) } } return nil }, }
Cmd command line declaration
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.