3 ms·
random question here, but what are people using in the way of ORM/sql access with go? Just database/sql or are there any other good packages worth checking out.
by enahs-sf 10y ago
random question here, but what are people using in the way of ORM/sql access with go? Just database/sql or are there any other good packages worth checking out. I don't expect a full-blown activerecord style ORM, but something that takes a bit of the pain out of mapping structs to records.
- n0w 10y agoI've been looking forward to 1.8 to solve this problem. I wrote a small tool using the new `ColumnType` info that takes my SQL queries and generates code to query the database and unmarshal rows into an array of structs.
- cenanozen 10y agoI would love to see that tool
- edcastro 10y agohttps://github.com/jinzhu/gorm https://github.com/jinzhu/gorm is quite ok
- sethammons 10y agoCheck out https://github.com/vattle/sqlboiler https://github.com/vattle/sqlboiler. I prefer the STD lib usually. Also, look at https://github.com/jmoiron/sqlx https://github.com/jmoiron/sqlx for easier struct mapping.