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

Function storedproc

python/graphscope/gsctl/commands/interactive/graph.py:112–125  ·  view source on GitHub ↗

Create a stored procedure from file

(filename)

Source from the content-addressed store, hash-verified

110 help="Path of yaml file",
111)
112def storedproc(filename):
113 """Create a stored procedure from file"""
114 if not is_valid_file_path(filename):
115 err(f"Invalid file: {filename}")
116 return
117 current_context = get_current_context()
118 graph_identifier = current_context.context
119 try:
120 stored_procedure = read_yaml_file(filename)
121 create_stored_procedure(graph_identifier, stored_procedure)
122 except Exception as e:
123 err(f"Failed to create stored procedure: {str(e)}")
124 else:
125 succ(f"Create stored procedure {stored_procedure['name']} successfully.")
126
127
128@delete.command()

Callers

nothing calls this directly

Calls 11

is_valid_file_pathFunction · 0.90
errFunction · 0.90
get_current_contextFunction · 0.90
read_yaml_fileFunction · 0.90
create_stored_procedureFunction · 0.90
succFunction · 0.90
list_stored_proceduresFunction · 0.90
infoFunction · 0.90
dumpMethod · 0.65
to_dictMethod · 0.45

Tested by

no test coverage detected