MCPcopy Create free account
hub / github.com/alibaba/GraphScope / use

Function use

python/graphscope/gsctl/commands/insight/glob.py:71–80  ·  view source on GitHub ↗

Switch to GRAPH context, see identifier with `ls` command

(context, graph_identifier)

Source from the content-addressed store, hash-verified

69)
70@click.argument("GRAPH_IDENTIFIER", required=True)
71def use(context, graph_identifier):
72 """Switch to GRAPH context, see identifier with `ls` command"""
73 try:
74 graph_identifier = get_graph_id_by_name(graph_identifier)
75 graph_name = get_graph_name_by_id(graph_identifier)
76 switch_context(graph_identifier, graph_name)
77 except Exception as e:
78 err(f"Failed to switch context: {str(e)}")
79 else:
80 click.secho(f"Using GRAPH {graph_name}(id={graph_identifier})", fg="green")
81
82
83@cli.command()

Callers

nothing calls this directly

Calls 4

get_graph_id_by_nameFunction · 0.90
get_graph_name_by_idFunction · 0.90
switch_contextFunction · 0.90
errFunction · 0.90

Tested by

no test coverage detected