Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "info <graph>", Short: "Print vertex/edge counts for 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 } fmt.Printf("Graph: %s\n", graph) q := gripql.V().Count() res, err := conn.Traversal(&gripql.GraphQuery{Graph: graph, Query: q.Statements}) if err != nil { return err } for row := range res { fmt.Printf("Vertex Count: %v\n", row.GetCount()) } q = gripql.E().Count() res, err = conn.Traversal(&gripql.GraphQuery{Graph: graph, Query: q.Statements}) if err != nil { return err } for row := range res { fmt.Printf("Edge Count: %v\n", row.GetCount()) } return nil }, }
Cmd line declaration
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.