Create a stored procedure from file
(filename)
| 110 | help="Path of yaml file", |
| 111 | ) |
| 112 | def 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() |
nothing calls this directly
no test coverage detected