gravitino.api.function.function_change.RemoveDefinition¶
- class gravitino.api.function.function_change.RemoveDefinition(parameters: List[FunctionParam])¶
Bases:
FunctionChangeA FunctionChange to remove an existing definition from a function.
- __init__(parameters: List[FunctionParam])¶
Methods
__init__(parameters)add_definition(definition)Create a FunctionChange to add a new definition (overload) to a function.
add_impl(parameters, implementation)Create a FunctionChange to add an implementation to a specific definition.
Returns the parameters that identify the definition to remove.
remove_definition(parameters)Create a FunctionChange to remove an existing definition from a function.
remove_impl(parameters, runtime)Create a FunctionChange to remove an implementation for a specific definition.
update_comment(new_comment)Create a FunctionChange to update the comment of a function.
update_impl(parameters, runtime, implementation)Create a FunctionChange to update an implementation for a specific definition.
Attributes
An empty list of parameters.
- EMPTY_PARAMS: List[FunctionParam] = []¶
An empty list of parameters.
- static add_definition(definition: FunctionDefinition) FunctionChange¶
Create a FunctionChange to add a new definition (overload) to a function.
- Args:
definition: The new definition to add.
- Returns:
The change instance.
- static add_impl(parameters: List[FunctionParam], implementation: FunctionImpl) FunctionChange¶
Create a FunctionChange to add an implementation to a specific definition.
- Args:
parameters: The parameters that identify the definition to update. implementation: The implementation to add.
- Returns:
The change instance.
- parameters() List[FunctionParam]¶
Returns the parameters that identify the definition to remove.
- static remove_definition(parameters: List[FunctionParam]) FunctionChange¶
Create a FunctionChange to remove an existing definition from a function.
- Args:
parameters: The parameters that identify the definition to remove.
- Returns:
The change instance.
- static remove_impl(parameters: List[FunctionParam], runtime: RuntimeType) FunctionChange¶
Create a FunctionChange to remove an implementation for a specific definition.
- Args:
parameters: The parameters that identify the definition to update. runtime: The runtime that identifies the implementation to remove.
- Returns:
The change instance.
- static update_comment(new_comment: str) FunctionChange¶
Create a FunctionChange to update the comment of a function.
- Args:
new_comment: The new comment value.
- Returns:
The change instance.
- static update_impl(parameters: List[FunctionParam], runtime: RuntimeType, implementation: FunctionImpl) FunctionChange¶
Create a FunctionChange to update an implementation for a specific definition.
- Args:
parameters: The parameters that identify the definition to update. runtime: The runtime that identifies the implementation to replace. implementation: The new implementation.
- Returns:
The change instance.