Microservice Patterns and Best Practices
上QQ阅读APP看书,第一时间看更新

Golang ORMs

A feature which is adopted by the Gophers, the name was given to developers using Go, is not using ORMs. Often the preference is to use only the communication driver in the database.

Often Gophers dispense the using of an ORM to adopt just a tool that helps to make more practical information from the database in a Go struct. A tool of this type of relational database is SQLX (https://github.com/jmoiron/sqlx).

SQLX does not work like ORM; it is only library to create a more friendly interface for native Go packages to communicate with the database/SQL.

If the chosen database application is to be NoSQL, it will hardly be adopting any data interpretation tools, as the most practical method is to use only the available driver.