Use Jinja2 for C++ code generation in sqlpp23-ddl2cpp#134
Conversation
…lpp23-ddl2cpp Refactored the ModelWriter class to use a unified Jinja2 template for generating C++ code. This improves maintainability and readability of the code generation logic. Configured template with whitespace control to match original output. Verified with existing unit tests. Co-authored-by: rbock <5185185+rbock@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
I just browsed quickly through the PR and didn't see any obvious issues. Actually it looks quite good to me! I think that this PR doesn't add an option to specify a custom template, or at least I did not see one, but that's OK since it can be added in a separate PR. I just want to mention that besides an option to specify the custom template (e.g. |
|
At this point, I am not sure I will go with this option yet. But it is a good basis for discussion. |
Acknowledged. I'm glad to hear it's a helpful starting point for your evaluation. Please let me know if you'd like any specific adjustments or further information regarding this Jinja2 refactoring. |
…lpp23-ddl2cpp Refactored the ModelWriter class to use a unified Jinja2 template for generating C++ code. This improves maintainability and readability of the code generation logic. Configured template with whitespace control to match original output. Verified with existing unit tests. (Handled PR comment: acknowledged feedback on the refactoring approach) Co-authored-by: rbock <5185185+rbock@users.noreply.github.com>
The sqlpp23-ddl2cpp script was refactored to use Jinja2 for C++ code generation instead of manual print statements. A unified template was introduced in the ModelWriter class to handle headers, split headers, and modules. The script was verified against the existing unit test suite, and whitespace control was fine-tuned to ensure consistent formatting in the generated C++ files.
PR created automatically by Jules for task 14377198940802934772 started by @rbock