Check if a system procedure requires graph context Only gql.* namespace procedures are recognized as system procedures. All other namespaces are reserved for user-defined procedures (future feature).
(&self, procedure_name: &str)
| 2792 | /// Only gql.* namespace procedures are recognized as system procedures. |
| 2793 | /// All other namespaces are reserved for user-defined procedures (future feature). |
| 2794 | fn procedure_needs_graph_context(&self, procedure_name: &str) -> bool { |
| 2795 | // Only accept gql.* namespace for system procedures |
| 2796 | // Reject system.* and plain names to enforce standard namespace |
| 2797 | let normalized_name = procedure_name.to_string(); |
| 2798 | |
| 2799 | let result = match normalized_name.as_str() { |
| 2800 | // Graph-independent catalog procedures |
| 2801 | "gql.list_schemas" |
| 2802 | | "gql.list_graphs" |
| 2803 | | "gql.list_graph_types" |
| 2804 | | "gql.describe_graph_type" |
| 2805 | | "gql.list_node_types" |
| 2806 | | "gql.describe_node_type" |
| 2807 | | "gql.get_schema_statistics" |
| 2808 | | "gql.get_version_history" |
| 2809 | | "gql.describe_schema" |
| 2810 | | "gql.describe_graph" |
| 2811 | | "gql.current_schema" |
| 2812 | | "gql.current_graph" => false, |
| 2813 | |
| 2814 | // Authentication procedures that don't need graph context |
| 2815 | "gql.authenticate_user" => false, |
| 2816 | |
| 2817 | // Security management procedures that don't need graph context |
| 2818 | "gql.list_roles" | "gql.list_users" => false, |
| 2819 | |
| 2820 | // Model management procedures that don't need graph context |
| 2821 | "gql.list_models" | "gql.describe_model" | "gql.register_model" |
| 2822 | | "gql.delete_model" | "gql.load_model" | "gql.unload_model" | "gql.model_stats" => { |
| 2823 | false |
| 2824 | } |
| 2825 | |
| 2826 | // Index and function metadata procedures that don't need graph context |
| 2827 | "gql.list_indexes" |
| 2828 | | "gql.list_text_indexes" |
| 2829 | | "gql.describe_text_index" |
| 2830 | | "gql.list_functions" => false, |
| 2831 | |
| 2832 | // Cache management procedures that don't need graph context |
| 2833 | "gql.clear_cache" | "gql.cache_stats" => false, |
| 2834 | |
| 2835 | // Procedures that can work with explicit parameters or session context |
| 2836 | "gql.graph_stats" | "gql.sample_data" => false, // These handle their own graph resolution |
| 2837 | |
| 2838 | // Session-dependent procedures that don't need graph context |
| 2839 | "gql.show_session" => false, |
| 2840 | |
| 2841 | // All other procedures (unknown gql.* or non-gql.*) |
| 2842 | // Route to execute_call_statement_without_graph where proper errors will be raised |
| 2843 | _ => false, |
| 2844 | }; |
| 2845 | |
| 2846 | result |
| 2847 | } |
| 2848 | |
| 2849 | /// Check if a function requires graph context |
| 2850 | fn function_needs_graph_context(&self, function_name: &str) -> bool { |
no test coverage detected