If you're writing DB-driven apps in Golang -- and you should avoid to the maximum extent possible -- take a look at https://github.com/jinzhu/gorm .
-
-
Replying to @patio11
Plus side: the only sane way to do DB with Golang that I've seen. Minus side: it sacrifices many of the benefits of the type system.
1 reply 1 retweet 1 like -
Replying to @patio11
It's *really* easy to write a gorm query which does *not actually send a query to the DB* and does this *totally silently* w/ no error.
3 replies 2 retweets 2 likes -
Replying to @kennwhite
@kennwhite instance := // initialize it; err := db.Find(&instance).Related(&other_objects, "SomeForeignKey").Error; <-- Spot the bug.1 reply 0 retweets 0 likes
Replying to @kennwhite
@kennwhite If you don't use db.Model(&instance) it will do no query at all. (I think -- don't have old bugged code in front of me.)
8:59 AM - 6 Jul 2015
1 reply
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.