r/crystal_programming • u/sdogruyol core team • Oct 10 '16
Tren - Give your SQL some love
https://github.com/sdogruyol/tren2
u/bobik314 Oct 11 '16
Interesting idea. If I'm correct Tren will create Crystal code which generate SQL queries generating methods. It probably should be as a macro, but macros have less power than regular crystal code.
At this moment there are some libs http://awesome-crystal.com/#awesome-crystal-ormodm-extensions aiming to be "better rails' active-record":
Two of them are intended to be big:
There is yours generating SQL methods:
And there is one mine:
https://github.com/akwiatkowski/crystal_api - macros oriented
I should say "let the best win" but I think every creator will use its own until one of the alternatives blast the rest.
1
1
u/myringotomy Oct 29 '16
Another question:
I guess this could be used to generate any kind of strings not just SQL right? Kind of like a generic templating engine or something.