DEV Community

Keson.An
Keson.An

Posted on

Which ORM do you use in Golang, gorm, xorm,sqlx, bun or sql, is there a recommended scaffold generation code?

https://github.com/anqiansong/sqlgen

From the github, the golang orm with the top number of stars are gorm, xorm, sqlx, bun, etc. Although gorm provides a supporting scaffolding, but its difficulty is discouraging, xorm, sqlx, bun has not found a supporting scaffolding, we know that sqlc provides rich model generation functions, but its sql annotation rules are relatively rich, there are learning costs, but its rich functionality can cover most of the business queries, which is worth affirming, I refer to sqlc also wrote a sqlgen scaffolding, sql annotation rules are very simple, can also meet most of the scenarios, currently supports gorm, xorm, sqlx, bun and native sql code generation, which makes me use orm to greatly reduce the learning and development costs and improve the development efficiency. Share out welcome to build and learn together.

Top comments (1)

Collapse
 
mfbaseeksai profile image
Mohamed Fares Ben Ayed

I don't understand the concept of engines in XORM.