Skip to content

Mutual Generation Between @Sql Annotation and SQL Files #355

@xterao

Description

@xterao

Description

Implement an action to generate SQL files from @Sql annotations on DAO methods, and conversely, to add @Sql annotations to DAO methods from SQL file contents.

Implementation Details

When converting from @SQL to SQL file:

  • Change the sqlFile option to true for @Insert, @Update, @Delete annotations (and their Batch variants)

When converting from SQL file to @SQL annotation:

  • Change the sqlFile option to false for @Insert, @Update, @Delete annotations (and their Batch variants)
  • Delete the SQL file that is no longer needed

Use Cases

This feature would enable developers to easily switch between inline SQL (using @Sql annotation) and external SQL files based on their preferences or project requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions