Skip to content

Extend python-sdk to surface Java EE CRUD operations and queries #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 of 17 tasks
rahlk opened this issue Feb 8, 2025 · 0 comments
Open
5 of 17 tasks

Extend python-sdk to surface Java EE CRUD operations and queries #98

rahlk opened this issue Feb 8, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rahlk
Copy link
Collaborator

rahlk commented Feb 8, 2025

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 and JCRUDOperation
  • Above list of APIs in not exhaustive.
@rahlk rahlk added the enhancement New feature or request label Feb 8, 2025
@rahlk rahlk self-assigned this Feb 8, 2025
rahlk added a commit that referenced this issue Feb 8, 2025
…plications.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
rahlk added a commit that referenced this issue Feb 8, 2025
…lder.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
rahlk added a commit that referenced this issue Feb 8, 2025
…lder.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
rahlk added a commit that referenced this issue Feb 8, 2025
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant