gosqlgen
reddit.com·12w·
Discuss: r/golang

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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help