CCodemod

sql/add-index-before-select

No description available

sqlindex
Public
0 executions

Run locally

npx codemod sql/add-index-before-select

Example of using codemod that changes SQL.
It detects all SELECT statements and adds an index creation statement before them.
Inside SELECT statement for any fields that ends with _id it creates an index on that field.

Example

Before

sql

After

ts

Ready to contribute?

Build your own codemod and share it with the community.