Hi Rector Team! I was wondering if rector is suitable for refactoring arbitrary plain SQL query mixed with php code to an orm equivalent query #8356
Unanswered
alexandreelise
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Maybe I still did not yet grasp the true power of rectorphp even after reading your rector book. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I did similar things in the reverse direction in the past. If your sql queries look like that and are not built with concat and similar dynamic stuff you can run the query thru https://github.com/SQLFTW/sqlftw and based on the sql-ast create your php code |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, everything is in the title. This example is intentionnally using unsafe old code since it's refactoring old query to more secure format automatically if possible.
e.g. use case
result expected for that query after potential auto refactor by custom rector rule? maybe?
That's it. Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions