Description
Is your feature request related to a problem? Please describe.
We want to surface the database crud operations that are now produced by codeanalyzer version 2.2.0-dev (see issue #100)
Describe the solution you'd like
CLDK's java analysis must now capture the new fields of crud operations and expose them as APIs such as
-
analysis.get_all_crud_operations() -> List[Dict[str, Union[JType, JCallable, List[JCRUDOperation]]]]
-
analysis.get_all_create_operations() -> List[Dict[str, Union[JType, JCallable, List[JCRUDOperation]]]]
-
analysis.get_all_read_operations() -> List[Dict[str, Union[JType, JCallable, List[JCRUDOperation]]]]
-
analysis.get_all_delete_operations() -> List[Dict[str, Union[JType, JCallable, List[JCRUDOperation]]]]
-
analysis.get_all_update_operations() -> List[Dict[str, Union[JType, JCallable, List[JCRUDOperation]]]]
-
analysis.has_crud_operations(callable: JCallable) -> boolean
-
analysis.has_create_operations(callable: JCallable) -> boolean
-
analysis.has_read_operations(callable: JCallable) -> boolean
-
analysis.has_delete_operations(callable: JCallable) -> boolean
-
analysis.has_update_operations(callable: JCallable) -> boolean
-
analysis.get_crud_operations_in_method(callable: JCallable)
-
analysis.get_crud_operations_in_class(cls: JType)
Queries
-
analysis.get_all_crud_queries() -> List[JCRUDQuery]
-
analysis.get_all_read_queries() -> List[JCRUDQuery]
-
analysis.get_all_write_queries() -> List[JCRUDQuery]
-
analysis.get_all_named_queries() -> List[JCRUDQuery]
Some goodies to process named queries
-
analysis.find_named_query_definition(query_string: str) -> Dict[str, JCallable]
...
Describe alternatives you've considered
N/A
Additional context
- We may need new entries in the java model to capture
JCRUDQuery
andJCRUDOperation
- Above list of APIs in not exhaustive.