gosqlgen
reddit.com·20h·
Discuss: r/golang
Flag this post

Hi everybody :)

tldr. gosqlgen is a SQL code and test code generator from struct tag annotations.

I am just sharing a little project I worked on. It is nothing groundbreaking, but it kind of solved an issue I had for my projects. At work and also on home projects I usually model my database layer around struct types representing the database tables. I found it tedious to always re-implement the basic crud methods, especially if I am in the exploratory phase of the project. gosqlgen helps by automatically generating not just code but also tests.

For now, I only decided to implement just the 4 basic crud methods, with support for soft deletes and business key columns (aka unique constraints). Th…

Similar Posts

Loading similar posts...