Re:Show HN: Godb is a simple Go ORM for PostgreSQL, MySQL, S...
by camus2 on Thursday December 15, 2016 @10:24AM
(#13185147)
Code generation is always painful. It's yet another compiler add-on one has to add to a pipeline. Because now If I use your executable I have to manage your tool and its versions,it becomes yet another dependency. At least real/reified macros (that go lacks) need no third party executable . Code generation with third party tools means language fragmentation. Suddenly people add their own DSL on top of Go in form of a manifest. Suddenly Go executes instructions in comments and other horrors ...
Re:Show HN: Godb is a simple Go ORM for PostgreSQL, MySQL, S...
by cyri on Thursday December 15, 2016 @03:39PM
(#13188158)
Yes that sucks. So I have written / am writing my own code generation tool which runs only once and does not rely on any fancy instructions in comments. Ah yes ... maybe `go generate`. I hate a slow compiler.
Re:Show HN: Godb is a simple Go ORM for PostgreSQL, MySQL, S...
by lenka on Thursday December 15, 2016 @10:14AM
(#13185088)
Yeah, we use gopkg.in/reform.v1 in production. I've never had problems with code generation here. I like how it works, simple and clean.
Reform has enough methods for the daily routine queries. And also it's easy to use raw SQL queries with reform if we need them.
(disclosure: I'm the author)